Results 1 to 4 of 4

Thread: Working with database

  1. #1

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827

    Working with database

    I want to work with Access databse (.mdb) using C++. Is it possible using pure C++ (ADO or DAO) or I'll have to use MFC?
    Also it would be great if you have link to some tutorial or anything like that.
    Baaaaaaaaah

  2. #2
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238
    you can have it w/o MFC :P

  3. #3
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238
    include this in your header file.
    PHP Code:
    #pragma warning(push)
    #pragma warning(disable:4146)
    #import "c:\Program Files\Common Files\System\ADO\msado15.dll" no_namespace rename("EOF", "GetadoEOF")
    #pragma warning(pop) 
    and use it as...
    PHP Code:
    _ConnectionPtr m_pConnection
    _RecordsetPtr pRecordset

    _bstr_t sqlstr "SELECT * FROM TABLE1";
    pRecordset m_pConnection->Execute(sqlstr, &vRecsAffectedadOptionUnspecified); 

  4. #4

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827

    Great!

    Thanks, I'll try it out.
    Baaaaaaaaah

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width