Stephen
Stephen

Reputation:

How do I connect to an Access 2007 (accdb) file in Visual Studio 2008

I'm in a college class using the Microsoft visual studio 2008 for visual basic and i have a project where i'm supposed to connect a database but it can't recognize the database file as a database. I followed the book exactly so i don't know what the problem is.

Upvotes: 1

Views: 25801

Answers (4)

Mamoon Ahmed
Mamoon Ahmed

Reputation: 1

It will not connect until you change the format to mdb . go to acces project and go in save as option and save as access 2000 compatible format . now connect it to vb it will be connected . accdb file formats are supported by vb 2010 or 2010 too i think . Regards

Upvotes: 0

Terry
Terry

Reputation: 319

Maybe you are a visual person: MSDN How Do I Video Series This helped me out when building in an Access database to a project. TableAdapters is what I did not know how to implement and after this tutorial, I was doing great.

Upvotes: 0

Khalid Abuhakmeh
Khalid Abuhakmeh

Reputation: 10839

Check out http://connectionstrings.com/access-2007

this site will tell you what connection string you need to connect to Access 2007. Make sure your connection string is OK. Also try using the server explorer in Visual Studio to connect to the file; just add a new connection pointing to the Access file and click the "Test Connection" button and you should be good to go. Hope that helps.

Upvotes: 3

user27414
user27414

Reputation:

You may need to install the Office 2007 Data Connectivity Components.

(See also: this MSDN forum post)

Upvotes: 3

Related Questions