Hi there ,
Just wondering if anyopne could help me out with a problem I am having with a update statement.
I this error
ExecuteNonQuery: Connection property has not been initialized.
I have been at this all day and still can't figure the problem.
Hope someone can put a light on the matter .
thanks
Here the code I am using
Try
Connection_Update = New OleDbConnection("Provider = Microsoft.ACE.OLEDB.12.0;Data Source = KellihersLawnmowers.accdb")
OleCommand_Update = New OleDbCommand("Update tblRatings(Vat_Rate_New,Vat_Rate_Second,Labour_per_hour)Set" & _
" Vat_Rate_New = " & VatUser & _
" ,Labour_per_hour= " & HourUser & _
" ,Vat_Rate_Second = " & Vat2User & _
" ,Discount = " & DiscountUser & _
" WHERE ID = " & 1)
Connection_Update.Open()
OleCommand_Update.ExecuteNonQuery()
Catch myException As Exception
MsgBox(myException.Message)
Finally
Connection_Update.Close()
cnn.Close()
End Try
Thanks again .
Any help would really be appreciated.
James