Community discussion forum

in need of an answer....

  • 6 months ago
    i am having trouble in debuging my code which generates an error of : Multi-step operations generated errors. check each status value. i am using vb 6.0 and sQLyog..... here's my code Private Sub cmdAdd_Click() Unload Me frmCustomer.Show End Sub Private Sub cmdEdit_Click() Unload Me frmCustomer.Show End Sub Private Sub Command2_Click() Dim rsDelRec As New ADODB.Recordset Set rsDelRec = New ADODB.Recordset rsDelRec.Open "Delete from tblcust where CustomerID = '" & rsListCustomer.Fields!CustomerID & "'", cnn, adOpenDynamic, adLockOptimistic rsListCustomer.Requery Set DataGrid1.DataSource = rsListCustomer.DataSource DataGrid1.Refresh If rsListCustomer.EOF Then Set rsDelRec = Nothing MsgBox "There is no record to be deleted.", vbExclamation + vbOKOnly Exit Sub End If End Sub Private Sub Command3_Click() Unload Me frmMain.Show End Sub Private Sub Form_load() Set rsListCustomer = New ADODB.Recordset rsListCustomer.Open "Select * From tblcust", cnn, adOpenDynamic, adLockOptimistic Set DataGrid1.DataSource = rsListCustomer.DataSource DataGrid1.Refresh End Sub
    Post was edited on 30/04/2009 11:24:48 Report abuse
  • 6 months ago
    is this all the codes on your program? then the problem maybe that rsListCustomer.Fields!CustomerID doesn't have a value/no record is selected or rsListCustomer's state is already opened and you re-queried.. anu b dapat mangyayari?all records ng tblcust is madedelete? or certain record(s) lng...kz dun s query mo all records ng tblcust ireretrieve, kung certain records man dapat may restrictions kung anu lng ang idedelete ndi dapat *select * from tblcust*, add *where* command...tsaka check mo state ng rsListCustomer before using requery method..

Post a reply

Enter your message below

Sign in or Join us (it's free).

Want to stay in touch with what's going on? Follow us on twitter!