打开记录集函数如下:
BOOL CDemoDlg::OpenRecordset(LPCTSTR lpszSource, long nCursorType,long nLockType, long nOptions)
{……}
分别定义 _RecordsetPtr m_pRecordset;_RecordsetPtr m_pRecordset2;
if (!OpenRecordset(strSource))
{AfxMessageBox(_T("记录集打开失败。"));return;}
if (!OpenRecordset(strSource2))
{AfxMessageBox(_T("记录集2打开失败。"));return;}
其中,strSource和strSource2是一样的,为什么1能打开,2打开失败呢