Update via VB Script SQL database from the records used to print labels S’abonner

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"

1 commentaires

0
Avatar
K T
Actions pour les commentaires Permalien

I think the value of the object has changed since the end of printing. The object value is not found in the products table. It is recommended to add a line "msgbox ordno" before the UPDATE to check the value of ORDNO.

Vous devez vous connecter pour laisser un commentaire.