szSQL = "SELECT TOP 1 Url, Cached FROM PageCache WHERE Cached=0 ORDER BY ID ASC";pRs->Open( _variant_t(szSQL),
_variant_t((IDispatch*)m_pConn, true),
adOpenKeyset, adLockOptimistic, adCmdText);pRs->PutCollect("URL",(_variant_t)szURL);
这样会在PutColletc出错(但用GetCollect可以读出字段值),如果把SQL语句改为
"SELECT Url, Cached FROM PageCache WHERE Cached=0";
PutCollect就不会出错,这是为什么??
_variant_t((IDispatch*)m_pConn, true),
adOpenKeyset, adLockOptimistic, adCmdText);pRs->PutCollect("URL",(_variant_t)szURL);
这样会在PutColletc出错(但用GetCollect可以读出字段值),如果把SQL语句改为
"SELECT Url, Cached FROM PageCache WHERE Cached=0";
PutCollect就不会出错,这是为什么??
pRs->CursorLocation = adUseClient;
另外为什么我用 pRs->RecordCount 或 pRs->GetRecordCount() 返回的总是 -1 呢?