hello press save, i got and error and said ExecuteNonQuery: Connection property has not been initialized.
Here's the code:
Private Sub cmdSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSave.Click
Dim com As New OleDbCommand
com.Connection = con
com.CommandText = "insert into Sales values('" & txtSalesId.Text & "','" & txtCustomerId.Text & "','" & _
txtWatchId.Text & "','" & txtDate.Text & "'," & txtQuantity.Text & "," & txtAmount.Text & ")"
com.ExecuteNonQuery()
MsgBox("Record Inserted")
Call populateCustomer()
Call populateWatch()
End Sub
Please any1 correct my statement
thanks