Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. DAO Access and system.mdw

DAO Access and system.mdw

Scheduled Pinned Locked Moved Database
questiondatabase
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cr97
    wrote on last edited by
    #1

    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

    M 1 Reply Last reply
    0
    • C cr97

      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

      M Offline
      M Offline
      Mike Ellison
      wrote on last edited by
      #2

      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[^]

      C 1 Reply Last reply
      0
      • M Mike Ellison

        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[^]

        C Offline
        C Offline
        cr97
        wrote on last edited by
        #3

        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

        M 1 Reply Last reply
        0
        • C 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

          M Offline
          M Offline
          Mike Ellison
          wrote on last edited by
          #4

          Would this article help? http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_mfcnotes_tn054.asp[^]

          C 1 Reply Last reply
          0
          • M Mike Ellison

            Would this article help? http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_mfcnotes_tn054.asp[^]

            C Offline
            C Offline
            cr97
            wrote on last edited by
            #5

            Yes i think it would help !!! I found this article yesterday ... thank you !!! cr97

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups