I need to delete the row in access database through vb6.0...
I am using the search button to search the records,and then i need to delete those from the database,using the delete button.
In the same way i need to upadate/edit the info in vb form and update it to the databaseThis is the code i am using for delete,but its nt wrking:(

rs.Open "Select * from Details", Con, 1, 2
rs.MoveNext
rs!PS_NO = txtPSNo.Text
rs!Name = txtName.Text
If txtAccountNo.Text <> "" Then
rs!SALARY_ACC = txtAccountNo.Text
Else
rs!REMBSMNT_ACC = txtRmbr.Text
End If
If OptICICI.Value = True Then
rs!BANK = "ICICI"
Else
rs!BANK = "AXIS"
End If
rs!DT_OF_BTH = txtDOB.Text
rs!DT_OF_JOING = txtDOJ.Text
rs!PHONE_NO = txtPhno.Text
rs.Delete
MsgBox "Data Deleted"

try the simple code

con.begintrans              'con-----adodb connection object.
con.execute "your DML statement here"
con.committrans
This question has already been answered. Start a new discussion instead.