Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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...

 

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...

 

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...