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).
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).