Problem comes while updating

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I am facing problem while updating access 2003 table from vb.net. It works
only if I put value in the where statement. Whenevr I put variable in the
WHERE statement , it doesnt work. My code is given below.:
objConn.Execute("UPDATE SalesTable SET DocNumRef ='" & docno1 & "' WHERE
Salesorder ='" & SoNo& "' ")
i declared docno1, SoNo as integer, and both the fields are number in the
SalesTable.
Please help
thanks in advance
BBN
 
If the values are numeric, they should not have the single quote delimiters
around them. Try ...

objConn.Execute("UPDATE SalesTable SET DocNumRef =" & docno1 & " WHERE
Salesorder =" & SoNo)

The single quotes would be correct for text values.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top