DAO Access and system.mdw
-
How can i open an access-file (database.mdb) with DAO using a special systemdb/workgroupfile (database_sys.mdw) ??? if i use ODBC i can defien a systemdb in de ODBC-connect-string ... but it doesn't work with DAO !!! thx a lot cr97
Hi cr97. Take a look at the following article on MSDN; the sample code you want is under the heading "Opening a Database with User-Level Security". http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndao/html/daotoadoupdate_topic4.asp[^]
-
Hi cr97. Take a look at the following article on MSDN; the sample code you want is under the heading "Opening a Database with User-Level Security". http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndao/html/daotoadoupdate_topic4.asp[^]
thanx ... But how can i do that in C++ ??? i found this ...
void CDaoWorkspace::Create(LPCTSTR lpszName, LPCTSTR lpszUserName, LPCTSTR lpszPassword)
{
...// Get the DAODBEngine interface and initialize if necessary \_AFX\_DAO\_STATE\* pDaoState = AfxGetDaoState(); if (pDaoState->m\_pDAODBEngine == NULL) InitializeEngine();
...
}and i know that DAODBEngine has the method ...
pDaoState->m_pDAODBEngine->put_SystemDB(THIS_BSTR SystemDBPath);
Can i call this like it is to change the SystemDB ??? And i can't use this AfxGetDaoState() ... it's unknown ... mhg cr97
-
thanx ... But how can i do that in C++ ??? i found this ...
void CDaoWorkspace::Create(LPCTSTR lpszName, LPCTSTR lpszUserName, LPCTSTR lpszPassword)
{
...// Get the DAODBEngine interface and initialize if necessary \_AFX\_DAO\_STATE\* pDaoState = AfxGetDaoState(); if (pDaoState->m\_pDAODBEngine == NULL) InitializeEngine();
...
}and i know that DAODBEngine has the method ...
pDaoState->m_pDAODBEngine->put_SystemDB(THIS_BSTR SystemDBPath);
Can i call this like it is to change the SystemDB ??? And i can't use this AfxGetDaoState() ... it's unknown ... mhg cr97
Would this article help? http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_mfcnotes_tn054.asp[^]
-
Would this article help? http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_mfcnotes_tn054.asp[^]