Automated database lookup
Hi everyone!
I am entirely new to BarTender, in the trial period and I am trying to accomplish the following:
At the end of a production line, whenever a pallet of a certain product is finished, the operator would scan the barcode of the product being packaged, this would look up a record in my ERP-s database and it would return a single recordset generated with an SQL statement, this would populate my template and print a label for each pallet.
I have succesfully connected to the database, and retrieved the data I need for the template for all products in the Designer module, and associated them with my named data sources.
I also have succesfully set up the barcode scanner as trigger for an integration, used the variable (barcode) returned by the serial port for the SQL statement to return the recordset I want to print to my label, and saved it to another variable. Added the Print action and added a database override to use the recordset obtained from the Sql statement, however I am getting the error : Recordset type "SQL Server Database" cannot be overridden by specifying data in <TextData>.
Could you give me a hint as to where I am going wrong, or how to associate the recordset from th SQL statement with the fields on my label?
Thank you in advance!
-
pthane
★ BarTender Hero ★
As it sounds like you have already configured the label with a filter/query prompt that will interrogate your SQL data and pull out the correct record it sounds like all you need to do with the Integration is tell it that the serial prompt input will be used to populate that query.
I believe all you need to do for this is create a Serial Prompt Integration, configuring the input settings to match your scanners com port settings and then link the Print Document setting to your label, import the settings, and then configure the to use the (Insert Variable) %Event Data% (ie what has just been scanned) as the query prompt/filter value in your label and so it should look something like this
You do not need to execute any SQL at this point as the label is already configured to do this
0 -
Tamas Gaspar
★ BarTender Hero ★
Thank you for your reply Peter!
I think the problem was that I've had a database connection in the design, that brought me the data for all the possible products and I have filtered this data in another query in the integration, since I needed the barcode from the serial port to identify the product I want to print the label for. I have tried your solution, however the recordset transferred from the sql query doing the filtering to the Print action with the variable %EventData% does not get parsed. I am still getting the error "Recordset type "SQL Server Database" cannot be overridden by specifying data in <TextData>." with this method.
As a workaround, I did the whole thing the other way around. I have two integrations one for the serial port, which executes the filtering and writes the recordset to a text file, (I've connected my template to this text file), and another for file detection that takes the single record upon detection and prints it. This seems to work fine for the moment.
0
Iniciar sesión para dejar un comentario.
Comentarios
2 comentarios