Click here to Skip to main content
16,018,938 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Guys,

Today i'm trying to connect ms-access database,

but unfortunately i'm unable to connect to the database,

my connection string using web.config, like

<add name="AccessConn" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source='D:\17092013\MASubhan\DCSME.accdb; Persist Security Info=False"/>

* is this connection string is correct or not..

i'm getting error called: UNRECOGNIZED FORMAT

plz suggest me.


Thanks & Best Regards,
MOHAMMED

[edit]SHOUTING removed - OriginalGriff[/edit]
Posted
Updated 2-Oct-13 0:18am
v2
Comments
OriginalGriff 2-Oct-13 6:18am    
DON'T SHOUT. Using all capitals is considered shouting on the internet, and rude (using all lower case is considered childish). Use proper capitalisation if you want to be taken seriously.

Have a look at around this link, there will be plenty of connection string example available please try to modified you connection string based on your MS Access run time (2007/2010/2013 etc)

MS Access Connection string[^]
 
Share this answer
 
save your access database file in 2003 format after that your code will wor

or


if your Access database is in 2007 format then change your provider to Microsoft.Jet.OLEDB.12.0
 
Share this answer
 
you can set in project like this

sConnString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\trial.accdb;Persist Security Info=False;"
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900