error when trying to add data connection

B

BJ

I want to add data connection on access database and every time I'm getting
the same error:

"format of the initialization string does not conform to specification
starting at index 0"

I'm using Microsoft Access Database File (OLE DB) with this connection
string:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\cm.mdb"

can anyone help??
tnx
 
P

Paul Clement

¤ I want to add data connection on access database and every time I'm getting
¤ the same error:
¤
¤ "format of the initialization string does not conform to specification
¤ starting at index 0"
¤
¤ I'm using Microsoft Access Database File (OLE DB) with this connection
¤ string:
¤ "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\cm.mdb"

Is this what the connection string looks like in code? I'm trying to figure out where you copied it
from?


Paul
~~~~
Microsoft MVP (Visual Basic)
 
J

Jim Hughes

Any chance you are using C#?

If so, the \ character needs to be doubled (escaped)

Or the string variable needs to have an @ symbol

String connstring = @"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=d:\cm.mdb"
 
O

Otis Mukinfus

I want to add data connection on access database and every time I'm getting
the same error:

"format of the initialization string does not conform to specification
starting at index 0"

I'm using Microsoft Access Database File (OLE DB) with this connection
string:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\cm.mdb"

can anyone help??
tnx
That message is caused by a registry setting that has been removed (probably by
a registry cleaning application).

From MSDN Forums... It worked for me.

***************************************************************************

Hi everyone,

I have determined what seems to be causing the problem, but I would like to
verify that this is the cause for all of you that have seen the problem.

Please run regedit.exe and browse to the following location in the tree:

HKEY_CLASSES_ROOT\CLSID\{F9AE8980-7E52-11d0-8964-00C04FD611D7}

Underneath this key should be a sub-key called "ProgID" with a value of
"MSIDXS.1". If you can't find this, it is causing the problem you are seeing.
Adding this back should fix the issue.

Please let me know if this does not solve the problem. We will see if it is
possible to fix the code that makes some assumptions about the existence of this
key to have some default behavior that works even if it does not exist.

Thanks,
Stephen




--------------------------------------------------------------------------------
Visual Studio Data Team


Report Abuse

*****************************************************************************


Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com
 

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

Top