Last post Mar 18, 2008 12:34 PM by Mikesdotnetting
Mar 17, 2008 04:56 PM|vbnetman|LINK
Hi I new to ASP.Net and am using Visual Web Developer 2005 and am trying to add a Data Connection. I am choosing the data source as: Microsoft Access Database File (OLE DB) as i need to connect to an Access 2003 database file. When I enter the connection
string (the path to where the database is stored ex: ~App_Data/test.mdb) and click on test connection it says that it is successful.
However, when i click ok, I get the following error: Format of the initialization string does not conform to specification starting at index 0.
Even if i leave the connection string empty and just click on ok, I get the above error.
Any Help?? Please
Mar 18, 2008 01:33 AM|ramesh Addagatla|LINK
i have created ane prj. on acceess
and set it connection string to
<add key="DBConn" value="Provider=Microsoft.Jet.OLEDB.4.0; data source=\Database\GGNY.mbd"/>
in web.config and its working fine
Mar 18, 2008 03:38 AM|Mikesdotnetting|LINK
When I enter the connection string (the path to where the database is stored ex: ~App_Data/test.mdb)
That's not a connection string. That's a file path. That would work as the DataFile property of an AccessDataSource control. Your connection string should look like this:
Provider=Microsoft.Jet.OleDb.4.0; Data Source=|DataDirectory|test.mdb
In fact, you are better off browsing to the mbd file, and then agreeing to store the connection string in the web.config, when you are prompted to do so.
Mar 18, 2008 12:27 PM|vbnetman|LINK
Unfortunately I do not have the feature to browse off for the mdb file in the Visual Web Developer Express 2005. If i put the connection string such as: Provider=Microsoft.Jet.OleDb.4.0; Data Source=|DataDirectory|test.mdb
when im asked for it would it be fine?
Mar 18, 2008 12:34 PM|Mikesdotnetting|LINK
When you configure the SqlDataSource, you should get a screen that says Choose your Data Connection. From there, click New Connection, then choose Microsoft Access Database File. Then click Continue. From there, you should get a screen that has a Browse
button next to the Database file name box.