Skip to main content

Search

Search

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

Comments

2 comments

  • Avatar
    Peter Thane

    Sorry this is beyond my programming skills but I believe there maybe something in 2019 (when it is released) that will help out with writing information back into SQL

    0
  • Avatar
    锋权 周

    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"

    0

Please sign in to leave a comment.