Re: ADO 'AddNew' fails to add first record.

Bob Barrows [MVP] wrote:
ADODB::_RecordsetPtr pRecordset;
pRecordset->Open(TABLE_NAME, _variant_t((IDispatch
*)pConn,true),ADODB::adOpenKeyset, ADODB::adLockOptimistic,

This is the only potential problem I see: I believe that adOpenKeyset
and adCmdTable are mutually exclusive.

Actually, i'm not sure of this statement. You should check the value of the
CursorType property after opening the recordset (at runtime) to see what it

Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the


Relevant Pages