VC??ADO??????????????
???????????? ???????[ 2014/8/4 11:43:41 ] ????????????? ????
/**//******************************************************************
???????????????????
????????????????????????????????????
?о???????????Σ?
????£?2010-05-12
????????
??1????stdafx.h?????
#import "C:Program FilesCommon FilesSystemadomsado15.dll" no_namespace rename("EOF"??"adoEOF")
??2???????????InitInstance()?????
if(!AfxOleInit())
{
AfxMessageBox("OLE?????????");
return FALSE;
}
??3????.cpp??????????"CPFile.h"
*********************************************************************/
/**//*****************************************************************
CPFile.h
******************************************************************/
class CPData
{
public:
//?????????????
CPData();
//??????????????
CPData(_ConnectionPtr pConnection);
//????????
virtual ~CPData();
public:
//?????????
BOOL Connect(CString strUser??CString strPassword??CString strFileName="ConnectionParam.udl"??int nOptions=-1??CString strConStr="Provider=sqloledb.1;Data Source=(local);Database=VLan");
//?????????????
void DisConnect();
//???????????????????????????ν??в??
//??????????TRUE????????FALSE.????????洢???????г??????m_pRecordset??
//???????????????????????????г??????m_nResultRow??m_nResultCol??
BOOL Select(CString strSql);
//??????????????????????ε???????д???
//????????CStringArray????????pResult??
BOOL Select(CString strSql??CStringArray& Result);
//??????ν??в??
BOOL SelectMulitCol(CString strSql??CStringArray& Result);
//????
BOOL OpenTable(CString strTable);
//????
BOOL OpenTable(CString strTable??CStringArray& Result);
//????????????2???
BOOL Execute(CString strSql);
public:
BOOL ExecuteTrans(CStringArray& aSql);
//?????????
void CloseRecordset();
//????????????????
long GetResultCol();
//????????????????
long GetResultRow();
//??????????
_RecordsetPtr GetResult();
private:
//???????????????????
long m_nResultRow;
//?????_RecordsetPtr??????
long m_nResultCol;
//???????
_ConnectionPtr m_pConnection;
//??????????
_CommandPtr m_pCommand;
//????????
_RecordsetPtr m_pRecordset;
};
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11