Microsoft.Jet.OLEDB.4.0 Provider Error

  • Thread starter Thread starter Kaveh_1972
  • Start date Start date
K

Kaveh_1972

Guest
Im programming with Visual Basic .Net under Windows XP.
Ive installed an old Database program in XP and after that whenever I want to run my program which has the following code:

cnnContacts.Provider = "Microsoft.Jet.OLEDB.4.0;Jet OLEDBatabase Password=" & strPassword
cnnContacts.Open(strDatabasePath)

I get this error on OPEN command: "Provider Cannot be found. It may not be properly installed."

Ive uninstalled that old program and then reinstall Visual Studio .Net, but nothing has changed. I dont want to install Windows XP and VB .Net again. What can I do?
Thanks
 
Sorry, Its a typing mistake, the correct line is:

cnnContacts.Provider = "Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database Password=" & strPassword
cnnContacts.Open(strDatabasePath)
 
Last edited by a moderator:
Provider string...

You might need a space after the = in that string...

cnnContacts.Provider = "Microsoft.Jet.OLEDB.4.0;Jet OLEDBatabase Password= " & strPassword

Im not sure but that kind of stood out to me....hope it helps.
 
Im not sure but Im using DAO 3.6 and instead of password Im using

pwd=" & User_Password

and it works!

Try our provider with that change.
 
I forgot to tell...

There is no space between pwd= and the password (or password=)

There is only a space if the password contains one.
 
Back
Top