Access 2007 Connection String

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

Guest

Hi. I've been using Access 2003 (.mdb files) from ADO.NET for a while now.
I'd like to start connecting to the new .accdb files instead.

I've tried using the same connection string but changing the file name to
end with .ACCDB. It looks like:

ConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=SomeDBFile.accdb"

But when I do this, I get a runtime error:

"Unrecognized database format 'C:\Documents and Settings\......."

Can you tell me what the connection string *should* look like?

Alex
 
Hello,

Have you tried to create a blank text file in windows explorer with the udl
extension, and after that double click on it ?

This shoud guide you to find the correct connection string as it will write
on that text file the correct format...

I hope it helps,
 
Hi Alex,

Micosoft Jet engine doesn't support accdb file. You would have to use
Microsoft.ACE.OLEDB.12.0 to connect ACCESS 2007 accdb file.
The connection looks like
Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=C:\myFolder\myAccess2007file.accdb;Persist Security Info=False;

http://www.connectionstrings.com/?carrier=access2007
[ACE OLEDB 12.0]

However, before you start coding, please make sure Microsoft.ACE.OLEDB.12.0
has been located on your machine.
As Norman mentioned in his thread, you can download it from microsoft
website.
http://www.microsoft.com/downloads/details.aspx?FamilyID=7554F536-8C28-4598-
9B72-EF94E038C891&displaylang=en
[2007 Office System Driver: Data Connectivity Components]

Hope this helps. Please let me know if you still have anything unclear. I'm
glad to assist you. Have great day, Thanks
Best regards,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Is there any way to access the accdb file using the Data Source Connection Wizard? It says it only supports .mdf and .mdb files. I can access the accdb file without any problems from my app, but I can't use the wizard to generate any typed datasets for me. Is there a workaround?

Thanks,
Ken
 
Back
Top