Updating Serial Number In Database Works Too Well!
Hi
The client wants the serial number to increase automatically and to start from last number each day.
I've written a VBScript that connects to a MS SQL table, reads the larges serial number so far, adds 1 to the number and stores it back in the database.
This works fine - except that the script seems to run several times on curious occasions: The number increases by 3 when the template is opened, it increases by 3 when the template is printed (even though only one label is printed) etc. Essentially I only want it to run each time a new label is printed!
The script is in the DataSource for the serial number in the template and is as follows:
-
SOLVED
Put this script into the proper event (doh!) and it does exactly what is needed.
My version of BarTender is in Danish so I'm not sure what the proper name is for it, but the VisualBasic help explains it all!
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar