i am facing a problem when i try to add new records in to data base. first of all my tech details are given below
Front end - vb 6
Back end - Microsoft SQL Server 2000
i am connecting to sql through ADODB connection ( through code ). my purpose is when i click on the "ok" button then the records entered in my form will add to the database. but when i click on the ok button then a errors comes saying
" Run-time error '-2147217840(80040e4e)'
operation was canceled "
and the error is highlighted in adorset.Move 0
my code is like this
If (MsgBox("Are You Sure? You Want to Save The Record?", vbYesNo) = vbYes) Then adorset.Move 0 adorset.Update MsgBox "Record Saved" Call rsEmpC Call constateC Unload Me End If End Sub
one of the funniest thing is that if we press debug and run in regular base the record will be saved in to the table
please help me