Hi again my problem is i always make mistake in writing statement
for update, here's the code
Private Sub cmdUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdUpdate.Click
Try
Dim com As New OleDbCommand
com.Connection = con
com.CommandText = "update Watches set WatchBrand='" & txtWatchBrand.Text & "',WatchModel='" & txtWatchModel.Text & _
"',Manufacturer='" & txtManufacturer.Text & "',CountryOfOrigin='" & txtCountryOfOrigin.Text & "',Type='" & _
cmbType.Text & "',DescriptionOfWatch='" & txtDescription.Text & _
",Price=" & txtPrice.Text & ",PriceInclVat=" & txtPriceInclVat.Text & " Where WatchID='" & cmbWatchId.Text
com.ExecuteNonQuery()
MsgBox("Record Updated")
Call populate()
Catch
MsgBox("Error")
End Try
End Sub
For update i got syntax error in update statement
For my Delete statement, here's the code
Try
Dim com As New OleDbCommand
com.Connection = con
com.CommandText = "delete from Watches where WatchID='" & cmbWatchId.Text
com.ExecuteNonQuery()
MsgBox("Record Deleted")
Call populate()
Call clear()
Catch exp As Exception
MsgBox(exp.ToString())
End Try
i attached the program, so please help as quick as possible
Please help.