Update via VB Script SQL database from the records used to print labels Follow

0
Avatar
xi men

I am running Bartender 2019 R2 version. This problem still exists. What is the reason for this?

Print the data in the selected recorder and update its database value,

Dim SQL
Dim ordno
Set objConn = CreateObject("ADODB.Connection")
set rs = createobject("adodb.recordset")
connstr="DSN=SQL Anywhere 11 Demo;UID=dba;PWD=sql"
objConn.Open connstr
ordno=Format.Objects("print_Description").Value

SQL ="UPDATE products set name='print_oK' where description='" & ordno & "'"

objConn.execute SQL
objConn.close


Why is this statement not updated, is it caused by the assignment of the selected value?
If you write him as a value, you can successfully execute and update the database without any problem.
SQL ="UPDATE products set name='print_oK' where description='V-neck"

Please sign in to leave a comment.