|
-
February 19th, 2003, 10:33 AM
#1
Setting Ms-access 2k Password
I need to set programatically a password to a MS-ACCESS 2000 database. How I can do that ?
Source-code or links to it would be welcomed, especially that I do know COM/DCOM stuff. I believe that somehow the password is set by querying some MSACCESS interface ......
10x in advance
-
February 25th, 2003, 11:35 AM
#2
It might not be much help, but using DAO it is:
CDaoDatabase cdb;
cdb.Open( "c:\\database.mdb", TRUE, FALSE, "" );
COleVariant NewPassword( "password", VT_BSTRT );
COleVariant OldPassword( "", VT_BSTRT );
DAO_CHECK( cdbNew.m_pDAODatabase->NewPassword( V_BSTR( &OldPassword ), V_BSTR( &NewPassword ) ) );
cdb.Close();
Assuming there wasn't a password previously.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|