Thread: addnew in combination with Limt

addnew in combination with Limt

From
"Vellinga, Fred"
Date:

Hi,

I want to use the ADODB object model to do updates etc. But the following code does not do the update.

Set RST = New ADODB.Recordset
RST.Open "SELECT FldPtrFROM TblTown LIMIT 1;", CNN, adOpenKeyset, adLockOptimistic, adCmdText
RST.AddNew
RST.Fields("FldPtr").Value = 1
RST.Update

The following does however the work:

Set RST = New ADODB.Recordset
RST.Open "SELECT FldPtr FROM TblTown;", CNN, adOpenKeyset, adLockOptimistic, adCmdText
RST.AddNew
RST.Fields("FldPtr").Value = 1
RST.Fields("FldRetVal").Value = "Austin"
RST.Update

Is this a bug in the LIMIT operator?

Thanks,
Fred