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.
Printable View
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.
you can have it w/o MFC :P
include this in your header file.
and use it as...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)
PHP Code:_ConnectionPtr m_pConnection;
_RecordsetPtr pRecordset;
_bstr_t sqlstr = "SELECT * FROM TABLE1";
pRecordset = m_pConnection->Execute(sqlstr, &vRecsAffected, adOptionUnspecified);
Thanks, I'll try it out.:)