Forums

ASP

This topic is locked

Error when connecting to ACCESS 2000 DB on ASP.net

Posted 05 Nov 2005 15:53:19
1
has voted
05 Nov 2005 15:53:19 Daniel Harker posted:
Hi

Here is the connection string I am using:

Provider=Microsoft.Jet.OLEDB.4.0;
Data Source="C:\Documents and Settings\daniel\My Documents\DanHarker's Site\agony_aunt\lexy.mdb";
Persist Security Info=False

Which was generated by Dreamweaver 8. When I try to test it, it says "Format of the initialisation string does not conform to the OLE DB specification". What am I doing wrong?

Replies

Replied 06 Nov 2005 02:36:28
06 Nov 2005 02:36:28 Rene Bandsma replied:
I don't know if it will solve your problem but you are using a ' inside the string what will give you problems. In my opinion NEVER use any sign in a path or filename even no spaces.

I think that a datasource that uses the Server.MapPath will work (not using DanHarker's Site)

<pre id=code><font face=courier size=2 id=code>
Provider=Microsoft.Jet.OLEDB.4.0;
Data Source="C:\Documents and Settings\daniel\My Documents\DanHarker's Site\agony_aunt\lexy.mdb";
Persist Security Info=False
</font id=code></pre id=code>

<hr><b>DMXZone support manager</b><br><a href="www.kousman.nl">Kousman web resellers</a>
Replied 06 Nov 2005 02:46:32
06 Nov 2005 02:46:32 Daniel Harker replied:
Okay, Renamed my folder and removed the apostrophe. Server.MapPath did not work unfortuneately.

Here is my string now:

Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=C:\Documents and Settings\daniel\My Documents\DanHarkers Site\agony_aunt\lexy.mdb;
Persist Security Info=False

It is now saying the path is invalid.

Reply to this topic