Talk2Tom11
Well-known member
When i go to update a record using VB.net for a database in access I am getting the following error... "Argument Prompt cannot be converted to type String."
when my SQL statement is as follows it works fine...
But i want to replace the totalAmount with a variable from the form. So i changed the SQL statement to the following...
I was wondering if anyone knew why I am receiving this error. If anyone has and Idea place post.
when my SQL statement is as follows it works fine...
Code:
SQL = "UPDATE Products SET TotalAmount = 1234 WHERE ProductName= " + cbocCat.text + " "
But i want to replace the totalAmount with a variable from the form. So i changed the SQL statement to the following...
Code:
SQL = "UPDATE Products SET TotalAmount =" + txtAmount.text + "WHERE ProductName= " + cbocCat.text + " "
I was wondering if anyone knew why I am receiving this error. If anyone has and Idea place post.