Access 2007 file not accessible

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to write an application using VS 2005 that accesses an Access
database. Unfortunately, VS 2005 doesn't seem to understand the new Access
2007 file extention. Can VS 2005 use the new Access 2007 file format?
 
I was able to get the Database to be seen by VS2005, but have now run into
another road block. Can someone help me?!!

Here is the situtaion.

I am trying to write a small application that accesses data within an Access
2007 database file with an extention .ACCDB file. I am running Vista on my
computer and using Visual Studio 2005. I am having major difficulty
connecting to the database and actually reading data from it.

The default setting in the app.config file for the connectionstring created
by VS2005 is connectionstring="DSN=MS Access Database†and
providerName="System.Data.Odbc". This value does not work. It generates the
error: {"ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's
SQLSetConnectAttr failed"}.

I did some investigation and then tried connectionString="driver={Microsoft
Access Driver (*.accdb)};DBQ=GrammarData.ACCDB". This string generated the
error: “ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not
found and no default driver specifiedâ€

Both errors occur when the following code is run when the form is loading:
“this.conceptsTableAdapter.Fill(this.grammarDataSet.Conceptsâ€.

Does anyone have an example of how to load and read an Access database with
an extension of .ACCDB correctly?
 
Hi Steve,

From your description, you're encountering some problem about accessing
Office Access 2007 Accdb file in your .net application,correct?

As for your development (windows Vista box), is office 2007 also installed
on that box together with Visual Studio 2005? Based on my research,
accessing office 2007 data files as database require some new driver
components, and the error info you provided also indicate that the driver
is not correctly located. You can find the driver components here:

#2007 Office System Driver: Data Connectivity Components
http://www.microsoft.com/downloads/details.aspx?familyid=7554F536-8C28-4598-
9B72-EF94E038C891&displaylang=en

And the below web forum thread also discuss on the same question, you can
have a look also:

#How to access the Access 2007 database in VS2005?
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1448592&SiteID=1

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no rights.
 
You're welcome :)

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top