Searching for help on-line
-
I use Ado to connect SQL Server,when I deleted a record,the Provider report a Error Message:"Row handle referred to a deleted row or a row marked for deletion". The following is my sample code: pRecordset->delete(adAffectCurrent); pRecordset->Update(); pRecordset->MoveFirst(); i=0; while(!m_pRecordset->adoEOF) { varValue = pRecordset->GetCollect(long(i); i++; if (varValue.vt == VT_NULL) bstrValue = ""; AfxMessageBox(bstrValue); pRecordset->MoveNext(); }
-
I use Ado to connect SQL Server,when I deleted a record,the Provider report a Error Message:"Row handle referred to a deleted row or a row marked for deletion". The following is my sample code: pRecordset->delete(adAffectCurrent); pRecordset->Update(); pRecordset->MoveFirst(); i=0; while(!m_pRecordset->adoEOF) { varValue = pRecordset->GetCollect(long(i); i++; if (varValue.vt == VT_NULL) bstrValue = ""; AfxMessageBox(bstrValue); pRecordset->MoveNext(); }
This could be many things. Some people get it because they lack a primary key. Others because they are using a JOIN in their select and find they must set the UniqueTable and ResyncCommand and call Resync after a method. Others must call Refresh(). Others get it working using the SQL Command equivalents. This is just what I heard from groups.google.com, I don't use ADO.