Password protected DataBase 
Author Message
 Password protected DataBase

I've put a password on my ACCESS database and want to
access it from my MFC app. My project is a DAO project so
the database OPEN method, which has the password as a
parameter, is handled by MFC. How do I get the password
to MFC so it can open the database? If I have to take
over the OPEN how do I do that without messing up the MFC
code already in place?

Thanks for any help
Neil



Tue, 23 Aug 2005 22:56:17 GMT  
 Password protected DataBase
Hi,

I'm afraid that I cannot catch what you meant. You can pass the password to
CDaoDatabase::Open() and it will open passwrod protected database properly.
I am not sure why you need to get the password from MFC?

Regards,
HuangTM
This posting is provided "AS IS" with no warranties, and confers no rights.



Tue, 23 Aug 2005 23:43:32 GMT  
 Password protected DataBase

Quote:
>-----Original Message-----
>Hi,

>I'm afraid that I cannot catch what you meant. You can

pass the password to
Quote:
>CDaoDatabase::Open() and it will open passwrod protected
database properly.
>I am not sure why you need to get the password from MFC?

>Regards,
>HuangTM
>This posting is provided "AS IS" with no warranties, and
confers no rights.

>.
>Let me try and clarify. When you create a DAO project

the database is not opened directly by the application
code. When you create a CDaoRecordSet the default
database that is set up as part of the document is opened
automatically by the MFC framework code. So there is no
pointer accessable for the CDaoDatabase. Therefore, I
have 2 choices. Either somehow pass the password to the
framework code that opens the database or take over the
the opening of the CDaoDatabase. In the second case I'd
have to know how to do it without disturbing the
framework functions that depend on having the control
over the database.


Wed, 24 Aug 2005 07:02:46 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Password Protected DataBase

2. Open a password protected DataBase

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

4. DAO password protected database and class wizard

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

6. Password protected database (DAO)

7. Open a password protected Database

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

9. Open a password-protected Access database

10. Error compacting a password-protected Access database

11. SQLConfigDataSource and password protected ACCESS database

12. Password protected Access Database

 

 
Powered by phpBB® Forum Software