in need of an answer....

mysql , sqlyog , vb 6.0 Philippines
  • 10 years 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
  • 10 years 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) 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).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“There are only 3 numbers of interest to a computer scientist: 1, 0 and infinity”