在使用CRecordset并且使用了useMultiRowFetch来Open时,如何取得记录数??(用SQLRowCount()取得的值已经为Rowset的值,不对),怎么办..
而且我也重载Open函数,把CRecordset::Open()重写了一遍,并且在里面的SQLExecDirect后自己加代码
...
while (!bConcurrency)
{
// Prepare or execute the query
if (m_dwOptions & executeDirect)
{
AFX_ODBC_CALL(::SQLExecDirect(m_hstmt,
(UCHAR*)lpszWSQL, SQL_NTS));
int iRetCode;
iRetCode = SQLRowCount(m_hstmt, &m_lRowCount);
if ( !(iRetCode == SQL_SUCCESS_WITH_INFO || iRetCode == SQL_SUCCESS || iRetCode == SQL_NO_DATA_FOUND) )
{
m_lRowCount = -1;
ThrowDBException(iRetCode);
}
}
.....