跳到主内容

搜索

搜索

Using A Named Data Source To Aid In Oracle Query

评论

5 条评论

  • Avatar
    Ian Cummings
    版主

    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
  • Avatar
    Legacy Poster

    Will the Query Prompt stop operation and require user intervention? If so, this won't work in our situation.

    0
  • Avatar
    Legacy Poster

    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
  • Avatar
    Legacy Poster

    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
  • Avatar
    Ian Cummings
    版主

    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

请先登录再写评论。