No access to password-protected database using OLE-DB. Can someone help? 
Author Message
 No access to password-protected database using OLE-DB. Can someone help?

Did you check the "Allow saving password" box in the data link dialog?
Alternatively, you can provide the password in connection string yourself.

- Chu

Quote:

> Hello!

> I have following problem: Using App-Wizard in VC 6++ I createed
> a database application. As datasource I used OLE DB and the
> MS Jet3.51 OLE DB Provider to connect to a ACCESS database
> that is secured by a database password. I set the JET OLEDB
> database password (Data Link Properties All) to the correct
> string and I tested the connection successfully.

> In the resulting code generated by app wizard
> hr = db.OpenWithServiceComponents("Microsoft.Jet.OLEDB.3.51", &dbinit);
> is OK, but  hr = session.Open(db); fails.
> Without a database password everything works fine. I am suspecting
> that App-Wizard forgot to generate the correct password property.

> How can I do it to get things running?

> Thanks in advance  Tobias



Tue, 27 May 2003 23:43:56 GMT  
 No access to password-protected database using OLE-DB. Can someone help?

Quote:

> Did you check the "Allow saving password" box in the data link dialog?

Yes. But seems to be related to the user-password, not the database
password.

Quote:
> Alternatively, you can provide the password in connection string yourself.

Well, unfortunately I don't know the correct syntax. For the user-password
that's easy. I tried to get further information and found provider-defined
properties DBPROPSET_JETOLEDB_DBINIT. There is
DBPROP_JETOLEDB_DATABASEPASSWORD, but I found no
hint how to apply it :-(


Fri, 30 May 2003 21:33:12 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Using CDaoDatabase to Open a Password Protected Access DB

2. repairing and compacting a password protected ODBC Access db

3. Open a password-protected Access database

4. Error compacting a password-protected Access database

5. SQLConfigDataSource and password protected ACCESS database

6. Password protected Access Database

7. How to compact a password protected database with Visual C++ using ODBC

8. How to compact a password protected database with Visual C++ using ODBC

9. Creating Database files using OLE DB

10. Connection to Database from multiple processes using OLE DB

11. Getting a list of databases from an SQL server using OLE-DB (or any other method)

12. Please someone help me with Access DB!

 

 
Powered by phpBB® Forum Software