Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cancel operation

Status
Not open for further replies.

Casiopea

Programmer
Jan 15, 2003
47
0
0
ES
Hi!
I am using classes to work with one database. When I cancel an updating operation, and I try to classrs.movenext it gives me an error "214721842 cancel operation", when I have already classrs.cancelupdate done and it looks like correct.

What should I do?
Thank you
 
'botón de actualización
Private Sub cmdUpdate_Click()
On Error GoTo UpdateErr
Me.MaskEdBox2_Validate (False)
Me.validartxt0
If PrimaryCLS.clv_repetida <> Trim(txtFields(0)) And _
Not (PrimaryCLS.exist_key(Trim(txtFields(0)))) Then
PrimaryCLS.clv_repeat = txtFields(0)
PrimaryCLS.Update
Else
txtFields(0) = PrimaryCLS.clv_repetida
PrimaryCLS.clv_repeat = 0
Call MsgBox("Exist key", vbCritical)
End If

SetButtons True
SetControles False
UpdateErr:
If Err.Number <> 0 Then
MsgBox Err.Description
End If
End Sub

It is check that the key already exist, and it works; it gives me the message, then I restore the value of the
control (primary key of the record). Finally if I click moveNext or movePrevious it display the error message.

Private Sub cmdNext_Click()
On Error GoTo GoNextError
PrimaryCLS.MoveNext
Exit Sub
GoNextError:
If Err.Number <> 0 Then Call MsgBox("Error: " & Err.Number & " " & Err.Description)
End Sub

Here is where I've got the error.
 

Without knowing the code behind this recordset wrapper class, it is hard to say what is wrong.

The way it looks, the error is being returned from that class wrapper itself (the programmer's - of the class - own defined error) and not ADO.
See if you can find out exact ADO error code and description behind this, if this is even one caused by ADO at all.
 

This just may be an error coming from a bound control such as a datagrid or the data environment.
Are you trying to update a recordset which uses a JOIN (I mean edit, and not just add or delete)

Is any one of these a possibility?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top