Hi,

Since my db upgrade from SQL 7 to SQL 2000, one of my MTS objects
fails with the error: "0x80004005 Microsoft Cursor Engine -
Insufficient base table information for updating or refreshing.". I am
selecting all fields from a single table, which has an autonumber
column as the primary key. I'm running ADO 2.6.

STDMETHODIMP MTSObject::Get(IDispatch **ppRSData)
{
_RecordsetPtr adoRS(__uuidof(Recordset));
//CADOSQLStatement is a wrapper class to execute SQL statements
CADOSQLStatement sql("ODBCDSN", "UserName", "Password");
sql.Execute(_T("esp_GetData"), adoRS, adOpenKeyset,
adLockBatchOptimistic);
*ppRSData = (IDispatch*)adoRS;
adoRS->AddRef();
}

/*The caller of the MTX Object modifies the recordset*/

STDMETHODIMP MTSObject::Put(IDispatch *pRSData)
{
_ConnectionPtr pConn(__uuidof(Connection));
pConn->CursorLocation = adUseServer;
hr = pConn->Open(_bstr_t(_T("ODBCDSN")),
_bstr_t(_T("UserName")),
_bstr_t(_T("Password")), -1);
_RecordsetPtr adoDestRs = pRSData;
hr = adoRs->putref_ActiveConnection(pConn);
hr = adoRs->UpdateBatch(adAffectAll); /* <-- this fails against SQL
2000 */
}

The idea is to get a disconnected recordset using the Get method,
modify it in the client application, and apply the updates with Put. I
know this may not be what UpdateBatch is supposed to be used for, but
as far as I know there is no way of keeping the db connection open
through DCOM, and using single insert and update statements is a pain
with the number of records that may or may not be updated in this
recordset.

If anyone has an idea of what part of my code causes SQL 2000 to fail,
while SQL 7 was perfectly happy, I would greatly appreciate you
comments.

Thanks,
Hollish