Zum Hauptinhalt gehen

Suche

Suche

Using A Stored Procedure In Custom Sql Statement

Kommentare

3 Kommentare

  • Avatar
    Domingo Rodriguez
    Moderator

    Find below our general instructions for running a stored procedure from within BarTender:

     

    • Set your Database Connection to use a Custom SQL stored procedure.
    • Open the label format.
    • Go to File > Database Connection Setup.
    • If not already connected, connect to your database.
    • Go to the SQL Tab.
    • Check Custom SQL.
    • Enter your stored procedure into the text box like this (T-SQL example):

    EXEC  [dbo].[Test_Procedure]

     

    To use query prompts with your Stored Procedure

     

    • Open Database Connection Setup.
    • Go to the SQL tab.
    • Click the Query Prompts button.
    • Create a prompt for each piece of data the stored procedure calls for.
    • Specify the query prompt data in your SQL string like this (T-SQL example):

    EXEC  [dbo].[Test_Procedure] @field1 = N'?QueryPrompt1'

    Depending on the type of database in use, you may also need to check the “Use Client Cursor” checkbox. This checkbox is located on the Options tab in Database Connection Setup for all databases that support a local client cursor. In your case, please enable it.

     

    Do these general instructions help you to move forward? Do you perhaps need to first define 1 prompt for each piece of data the stored procedure calls for (4 in this case)?

    0
  • Avatar
    Jason Ruiter

    I tried this.  It doesn't work because the Database Field (that I plan to put in my label) is blank.  I can "test" it in the tool, but I can't actually use it in a label.  Is there a way to force a label on a database field?

    0
  • Avatar
    Bob Steele
    Moderator

    Jason,

     

    Can I ask why the field will be blank or what you would be using the field for?

    You may want to submit a support request from the main page of our support site explaining exactly what you are trying to do, Our support staff will be happy to assist in any way we can.

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.