I am try to update some records on a database using the following commands
Dim command As New SqlCommand("UPDATE Itemcodes SET SalePrice = '" & SellPrice & "' WHERE ItemCode = '" & CodeAN & "'", connection)
command.ExecuteNonQuery()
both SalePrice and CodeAN are String variables but when I debug my code the execute command is as follows
"UPDATE Itemcodes SET SalePrice = '' WHERE ItemCode = ''"
SalePrice has a value of 250 and CodeAn = E00003
Why can't I get the values to appear in the command line?
Dim command As New SqlCommand("UPDATE Itemcodes SET SalePrice = '" & SellPrice & "' WHERE ItemCode = '" & CodeAN & "'", connection)
command.ExecuteNonQuery()
both SalePrice and CodeAN are String variables but when I debug my code the execute command is as follows
"UPDATE Itemcodes SET SalePrice = '' WHERE ItemCode = ''"
SalePrice has a value of 250 and CodeAn = E00003
Why can't I get the values to appear in the command line?