Using A Named Data Source To Aid In Oracle Query
I am attempting to use BarTender (via Commander) to print custom shipping labels from our WMS system. The most direct means would be to export a few pieces of common data that could be used in a database query inside BarTender to get the actual label data.
Example, I would export a carton_number that would be used in a script to create a simple BTXML file. Inside the BTXML file a Named Data Source would be set, and that would be used inside BarTender to query the shipment's corresponding customer PO, Carton Qty, etc from the Oracle database.
We are trying to keep the exported data to a bare minimum to allow the WMS side to be the same for all customers and only the custom labels designed in BarTender would differ, depending on the data required.
I have seen comments in the forum from support stating that using a Named Data Source in a SQL Query is not supported, and in another question support provides an example on how to do this that me nor the original requester could get to work. If this is indeed not supported, it would seem to be an oversight/limitation of the software.
How is it recommended I proceed? Exporting additional data from the WMS system to cover all possibilities is NOT an option. Nor is anything requiring user intervention. This is a high speed automated process.
-
Setting a data source from the BTXML isn't going to help in terms of querying the database connected to the document. Instead you would setup the document to connect to the fixed database and then configure a named queryprompt. It is the named queryprompt value you would set in BTXML in order to query the database.
Example from the BarTender Help system:
<?xml version="1.0" encoding="utf-8"?> <XMLScript Version="2.0" Name="09232006_103601_Job1" ID="123"> <Command Name="Job1"> <Print> <Format>c:\BarTender\Document1.btw</Format> <QueryPrompt Name="Product"> <UserPrompt>Enter Product Name:</UserPrompt> <DefaultReply>Exotic Liquids</DefaultReply> </QueryPrompt> </Print> </Command> </XMLScript>
0 -
Will the Query Prompt stop operation and require user intervention? If so, this won't work in our situation.
0 -
I performed a quick test, and it appears to go working fine. No prompts when running through Commander with a BTXML file. Thank you.
0 -
Follow-up... Can a Query Prompt be set by VBScript to a truncated value of another Query Prompt?
Example, I have a Query Prompt value of "12345678001". Can I create a second Query Prompt that uses VBScript (or some other method) to create simply "12345678"?
This would simplify my BTXML, otherwise, I will need to pass the same value twice and use the Query Prompt truncate features. Using the Oracle substr function slows the query by at least 5 seconds (instead of being instantaneous).
0 -
You wish to use effectively two query prompts in your BTXML? Why not just use two query prompts then? Whatever is generating the BTXML could make use of the one input, truncating the value for the second query prompt as desired. Inside BarTender a query prompt is not like a named data source, its value cannot be reference elsewhere in the document by a VB script.
0
请先登录再写评论。
评论
5 条评论