About the Failure to operating Access DB

X

X.H.Qiu

Hello

I have a application which devoleped in VB.

In the application, a ADO recordset object is used to add a new record to a
Access table.
My code is like this:

Function AddNew(obj_rc as ADODB.Recordset, arValue as Variant)

on Error Goto e_Handle

obj_rc.addnew
obj_rc.fileds(0) = arValue(0)
obj_rc.fileds(1) = arValue(1)
obj_rc.fileds(2) = arValue(2)
obj_rc.fileds(3) = arValue(3) -----> E1 : Error occured, because of
arValue(3)'s exceeding the limit of size of field(3).
obj_rc.fileds(4) = arValue(4)
obj_rc.fileds(5) = arValue(5)
obj_rc.update

exit Function

e_Handle:
obj_rc.delete ----> E2: After E1 E2 happened, whose description is
"Update or CancelUpdate without AddNew or Edit."(ErrNo. 80040e21)

End Function

Those error describ as above E1, E2.

Now I wonder what the error(ErrNo80040e21) in E2 means.
Why does the error not happen. When the value type of arValue(3) is deferent
from fileld(3).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top