ADO Jet Connection Errors 
Author Message
 ADO Jet Connection Errors

Help Me PLEASE!!!!

I'm using vc++ 6.0 (sp3) with latest MDAC (2.5 ADO) and trying to connect to
Access 97 db with Jet 4.0.  If I set a password in the database, I get an
error saying either "Could not find installable ISAM" or  "Workgroup
information file is missing or opened exclusively by another user".  How do
I connect to an Access database with a Database Password using ADO?

Example #1 (xxx is Access password):

   _ConnectionPtr MyDb;
   MyDb.CreateInstance(__uuidof(Connection));

   MyDb->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=testdb.mdb;",
"", "xxx", -1);

Results in Workgroup information file missing message.

Example #2:

   _ConnectionPtr MyDb;
   MyDb.CreateInstance(__uuidof(Connection));

   MyDb->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=testdb.mdb;PWD=xxx", "", "", -1);
or
   MyDb->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=testdb.mdb;PWD='xxx'", "", "", -1);

Results in ISAM error

All combinations of 'xxx' or xxx and 'Admin' and Admin all give the same
results.

ps.  I always get a compiler warning:
e:\dataaccess\debug\msado15.tlh(403) : warning C4146: unary minus operator
applied to unsigned type, result still unsigned

Any ideas?

Thanks!



Fri, 30 Aug 2002 03:00:00 GMT  
 ADO Jet Connection Errors
Don't use "PWD=" for the password.  That (I believe) is the user password.
For a database password, use "Jet OLEDB:Database Password=".

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=mydatabase.mdb;Jet
OLEDB:Database Password=myDbpassword;";


Quote:
> Help Me PLEASE!!!!

> I'm using vc++ 6.0 (sp3) with latest MDAC (2.5 ADO) and trying to connect
to
> Access 97 db with Jet 4.0.  If I set a password in the database, I get an
> error saying either "Could not find installable ISAM" or  "Workgroup
> information file is missing or opened exclusively by another user".  How
do
> I connect to an Access database with a Database Password using ADO?

> Example #1 (xxx is Access password):

>    _ConnectionPtr MyDb;
>    MyDb.CreateInstance(__uuidof(Connection));

>    MyDb->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=testdb.mdb;",
> "", "xxx", -1);

> Results in Workgroup information file missing message.

> Example #2:

>    _ConnectionPtr MyDb;
>    MyDb.CreateInstance(__uuidof(Connection));

>    MyDb->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data
> Source=testdb.mdb;PWD=xxx", "", "", -1);
> or
>    MyDb->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data
> Source=testdb.mdb;PWD='xxx'", "", "", -1);

> Results in ISAM error

> All combinations of 'xxx' or xxx and 'Admin' and Admin all give the same
> results.

> ps.  I always get a compiler warning:
> e:\dataaccess\debug\msado15.tlh(403) : warning C4146: unary minus operator
> applied to unsigned type, result still unsigned

> Any ideas?

> Thanks!



Sat, 31 Aug 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. ADO Connection Error Message with ATL

2. ADO error on opening connection

3. Jet connection string for connecting to a Microsoft Access 2.0 database

4. Connection String for Text Jet OLE DB Provider ???

5. jet 3.51 oledb provider missing in datalink connection dialog

6. connection strings for the OLE DB Jet

7. ADO/ATL/Jet 3.5 Provider problem

8. Redists ADO and JET OLE DB

9. Jet Database Replication (JRO + ADO)

10. Read Jet-databas properties with ADO from vc++

11. Read Jet-database properties with ADO

12. Jet ADO threads and performance

 

 
Powered by phpBB® Forum Software