중요 소스만 ..........
/// 선언
#import "C:/program files/common files/system/ado/msado15.dll" rename("EOF", "EndOfFile")
typedef ADODB::_RecordsetPtr RecPtr;
typedef ADODB::_ConnectionPtr CnnPtr;
typedef ADODB::_CommandPtr ComPtr;
/// 생성
m_pconnection.CreateInstance(__uuidof(ADODB::Connection) );
/// DB Open
m_pconnection->Open("Provider=Microsoft.Jet.OLEDB.4.0; Data Source= aaa.mdb;", "", "", -1)
/// cursor 위치
m_pconnection->CursorLocation = ADODB::adUseClient;
/// Query 입력 실행
CString strQuery;
RecPtr recPtr = NULL;
recPtr = m_pconnection->Execute(strQuery, NULL, ADODB::adOptionUnspecified); // 쿼리 실행
댓글 없음:
댓글 쓰기