-
howdy, not sure if this is the proper place to post this question (if you know a good place for ASP forums pls give me URL)
Im trying to connect to an access database with an OLE DB connection string. I know the physical path o the database.
here's an example of the connection string
Code:
strConnect = "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=C:\Datastores\test.mdb;"
it works fine.. When I give the database a password an try conecting again i get this error :
Error Type:
Microsoft JET Database Engine (0x80040E4D)
Not a valid password.
Normal I reckon. so I expand the conectinostring to this:
Code:
strConnect = "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=C:\Datastores\test.mdb; DataBase Pasword=pass"
Now I get this error:
Error Type:
Microsoft JET Database Engine (0x80004005)
Could not find installable ISAM.
What's the problem ?? pls help me with this.....
-
Your connection string should look like this.
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\Db1.mdb;Jet OLEDB:Database Password='pwd'"
Note the 'Jet OLEDB:' Before the database password parameter, for some unknown reason ADO can't find the provider if you don't specify it on each parameter.
-
Yet another error
Ok I changed the connectionstring to:
Code:
strConnect = "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=C:\Datastores\test.mdb; Jet OLEDB DataBase Pasword=pass"
but now it gives me the following error:
Error Type:
Microsoft JET Database Engine (0x80040E4D)
Cannot start your application. The workgroup information file is missing or opened exclusively by another user.
Any ideas ?
-
Try this as your connection string:
strConnect = "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=C:\Datastores\test.mdb;Jet OLEDB:DataBase Password=pass"
-
Cheers Clunietp
Your connection String works.... Thanks....
I'll have to say that Microsoft did some bad documenation on this...
Also methink's that the interface should be consistent compared to other connection strings.
oh well, it works (that's all that realy matters)
thank you...