Using stored procedure with ExecuteXmlReader

Just looking to find out if it's possible to use stored procedures when createing an OracleCommand object that calls ExecuteXmlQuery. I'm having a problem and all the samples I've found for using this only use command text (inline SQL). TIA.
Edited by: user9529215 on Mar 27, 2009 7:48 AM

Hi,
I have similar problem. Have you already solved the issue?
Thanks

Similar Messages

  • Using stored procedures with a timestamp parameter with Delphi  and ADO

    Dear Oracle experts,
    I have a problem concerning using a stored procedure with Delphi.
    I try to use a stored procedure which hast two input parameters ( a integer and a timestamp).
    The timestamp parameter is my problem since I would like to use the "to_timestamp"
    Oracle-function to create the timestamp parameter to be inserted into my procedure.
    If I insert the to_timestamp statement as a adodatetime I have to perform the conversion to the oracle timestamp in my application.
    If I want to use the to_timestamp statement I have to use the ftstring datatype but in that case I get an error because I use a string as input for my procedure were it awaits a timestamp.
    So the problem seems to be that the function call "to_timestamp" is not interpreted if it is transferred through my ADO component.
    Do you know how to use a procedure with Delphi (ADO) with a function as input parameter ?
    Best regards,
    Daniel Wetzler
    P.S. :
    This is the Delphi code to use my Procedure.
    FactsTempDS:=TADODataset.Create(nil);
    Sproc1 := TAdoStoredProc.Create(nil);
    Sproc1.Connection := TDBConnection(strlistConnectionstrings.objects[iConnectionIndex]).Connection;
    Sproc1.ProcedureName := 'ECSPACKAGE.PROCFINDINITIALSWITCHSTATE';
    Sproc1.Parameters.CreateParameter ('SwitchID',ftInteger,pdinput,0,0);
    //Sproc1.Parameters.CreateParameter ('StartTime',ftdatetime,pdinput,50,0);
    Sproc1.Parameters.CreateParameter ('StartTime',ftString,pdinput,50,0);
    Sproc1.Parameters.Findparam('SwitchID').value:=SwitchID;
    Sproc1.Parameters.FindParam('StartTime').Value:= 'to_timestamp(''2005/12/30 19:36:21'', ''YYYY/MM/DD HH:MI:SS'')';
    Sproc1.CursorType := ctKeyset;
    Sproc1.ExecuteOptions:=[];
    Sproc1.Open;
    Sproc1.Connection := nil;
    FactsTempDS.Recordset:= sproc1.Recordset;
    if FactsTempDS.RecordCount=0
    then raise Exception.Create('No line switch variable found for switch '+IntToStr(SwitchID)+' before starttime. Check BDE dump filter.')

    I have my entity manager setup in a singleton.
    I'm finding it's costly to generate the emf, but if I don't close the em (enitity manager) and emf (entity manager factory) my open cursor count climbs until I exceed the max number of open cursors on the database (11g RAC)
    I'm committing the connection, and uow, and closing the em at the end of each call.
    But until I close the emf, the open cursors aren't released.
    TransactionhistoryPkg tranPkg = new TransactionhistoryPkg(conn); //Class created over database package via JPublisher
    tranPkg.transactionhistoryInsSp(insertTrans.getCardId()); // executes db package
    tranPkg.closeConnection();
    conn.commit();
    uow.commit();
    uow.getAccessor().decrementCallCount();
    em.close();
    Am I missing something really obvious here??
    btw - I found this link helpful in troubleshooting the max cursors issue: https://support.bea.com/application_content/product_portlets/support_patterns/wls/InvestigatingORA-1000MaximumOpenCursorsExceededPattern.html

  • How to use stored procedure with many return results and variable with perl

    Hi everybody,
    i´m writtting now a Perl programm, wich use a oracle stored procedure with more than 1 result and 1 variable(I have to return 2 variable fpr each result). I don´t now how I can get it.I already search the web but I didn´t find.
    My example:
    PROCEDURE get_projects_and_sub_projects (
    v_project_id IN INTEGER,
    v_project_c_id OUT INTEGER,
    v_project_id_find OUT VARCHAR2
    IS
    BEGIN
    SELECT c_id, proj_id
    INTO
    v_project_c_id,
    v_project_id_find
    FROM t_projet
    WHERE t_projet .ksa_pro_art_kbz = 'KU'
    AND t_projet.proj_id LIKE v_project_id || '%';
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    v_project_c_id := NULL;
    v_project_id_find := NULL;
    WHEN OTHERS
    THEN
    kmessages.error (NULL,
    'get_projects_and_sub_projects',
    'Project-Name: ' || v_project_id,
    'Errornumber: '
    || SQLCODE
    || ' Error: '
    || SQLERRM,
    TRUE,
    TRUE
    raise_application_error (-20001,
    'Error '
    || SQLCODE
    || ' get_projects_and_sub_projects: '
    || SQLERRM,
    TRUE
    END get_projects_and_sub_projects;
    in Perl Program:
    sub get_projects_unterprojects_name($$){
    my ($db_handle, $proj_name_id) = @_; #$db_handle ist the DB Connection return value
    my $db_proj_c_id;
    my $db_proj_name;
    eval{ my $csr = $db_handle->prepare(q{
    BEGIN
    pro_doc_ber.get_projects_and_sub_projects(:proj_name_id, :db_proj_c_id, :db_proj_name);
    END;
    # parameter value
    $csr->bind_param(":proj_name_id", $proj_name_id);
    # return values
    $csr->bind_param_inout(":db_proj_c_id", \$db_proj_c_id, 11);
    $csr->bind_param_inout(":db_proj_name", \$db_proj_name, 20);
    $csr->execute(); };
    But this didn´t work. Could somebody give me some idea?
    Thank you
    Felx

    Some additional info would probably be helpful.
    What is your programming enviironment? Java?
    In any case I suspect that you will need to use the OCI to deal with specific Oracle types such as user defined object types -- thats not standard ANSI SQL.
    In Java I believe you need to use OPAQUE, there are some examples out there. I'm mostly a PL/SQL developer with some Java expereince so others here are more qualifed to answer your question more directly.

  • XI/PI: jdbc receiver using stored procedure with arrays

    The company needs an interface to search for header data and detail to a legacy system.
    This interface from ERP  to legacy system is synchronous and uses stored procedure.
    The definition of the stored procedure is as follows:
    PROCEDURE
    Generar_Detalle_Vtas_Pagadas
        (p_cvendedor                 IN bdc_vendedores.cvendedor%TYPE,
        p_fdesde                   IN DATE,
        p_fhasta                     IN DATE,
        v_encabezado_ct           OUT encabezado_ct,
        v_detalle_vtas_pagadas_ct OUT detalle_vtas_pagadas_ct,
        err_num                 OUT NUMBER
    Data types used in stored procedure:
    TYPE encabezado_ct AS OBJECT
    ( CREGION         NUMBER(22),
      XREGION         VARCHAR2(50),
      CMERCADO        NUMBER(22),
      XMERCADO        VARCHAR2(50),
      CTVENDEDOR      VARCHAR2(5),
      XCTVENDEDOR     VARCHAR2(50),
      XDENOMINACION   VARCHAR2(15))
    TYPE detalle_vtas_pagadas_ct AS OBJECT
    (     CITEM           VARCHAR2(10),
          XIDENTIFICADOR  VARCHAR2(15),
          XCONTRATO       VARCHAR2(15),
          XVALOR          VARCHAR2(30),
          CCUENTA         VARCHAR2(15),
          FACTIVACION     DATE,
          XDOMINIO        VARCHAR2(30),
          CCED            VARCHAR2(20),
          XCLIENTE        VARCHAR2(161),
          CCPO            VARCHAR2(60) )
    As shown, this has three input parameters varchar and date respectively and has three output parameters, two of which are defined with a data
    type such as table and the other number.
    The problem is to define the signature of the stored procedure in XI when defining the data type request, the message type and mapping system
    legacy because the data type is not supported (tables: detalle_vtas_pagadas_ct,encabezado_ct  )

    FORM 2:
    defined as an array, but the error tells me that we need to define the attribute either input or output
    <?xml version="1.0" encoding="UTF-8"?>
         <ns0:MT_VtasPagadas_VYC xmlns:ns0="urn:VentasPagadas:VE_ALTASDEDCALIDAD_SD_VYC">
          <VtasPagadasRequest><Generar_Detalle_Vtas_Pagadas action="EXECUTE">
             <table>vyc.Vyc_Pack_Reportes_Sap.Generar_Detalle_Vtas_Pagadas</table>
             <p_cvendedor type="VARCHAR"></p_cvendedor>
             <p_fdesde type="DATE"></p_fdesde>
             <p_fhasta type="DATE"></p_fhasta>
             <v_encabezado_ct>
                 <CREGION isOutput="1" type="NUMERIC">X</CREGION>
                 <XREGION isOutput="1" type="VARCHAR">X</XREGION>
                 <CMERCADO isOutput="1" type="NUMERIC">X</CMERCADO>
                 <XMERCADO isOutput="1" type="VARCHAR">X</XMERCADO>
                 <CTVENDEDOR isOutput="1" type="VARCHAR">X</CTVENDEDOR>
                 <XCTVENDEDOR isOutput="1" type="VARCHAR">X</XCTVENDEDOR>
                 <XDENOMINACION isOutput="1" type="VARCHAR">X</XDENOMINACION>
            </v_encabezado_ct>
            <v_detalle_vtas_pagadas_ct>
                 <CITEM isOutput="1" type="VARCHAR">X</CITEM>
                 <XIDENTIFICADOR isOutput="1" type="VARCHAR">X</XIDENTIFICADOR>
                 <XCONTRATO isOutput="1" type="VARCHAR">X</XCONTRATO>
                 <XVALOR type="VARCHAR">X</XVALOR>
                 <CCUENTA isOutput="1" type="VARCHAR">X</CCUENTA>
                 <FACTIVACION isOutput="1" type="DATE">X</FACTIVACION>
                 <ICTA isOutput="1" type="VARCHAR">X</ICTA>
                 <CCED isOutput="1" type="VARCHAR">X</CCED>
                 <XCLIENTE isOutput="1" type="VARCHAR">X</XCLIENTE>
                 <CCPO isOutput="1" type="VARCHAR">X</CCPO>
            </v_detalle_vtas_pagadas_ct>
            <err_num isOutput="1" type="NUMERIC">X</err_num>
         </Generar_Detalle_Vtas_Pagadas>
      </VtasPagadasRequest></ns0:MT_VtasPagadas_VYC>
    Edited by: ymonasterio on Mar 31, 2010 4:48 PM

  • Using Stored Procedures with TopLink / JPA : Success explanation

    For those who have to use Stored Procedures in TopLink this is my success history :
    To call an Stored Procedure from the persistence, we have to use the direct JDBC connection because my TopLink version ( Essentials 10g ) ? to date ( 10g ) does not have support for Stored Procedures.
    Here is my code :
    <address>{color:#0000ff} EntityManagerFactory JPAemfactory = null;{color}</address>
    <address>{color:#0000ff} JPAemfactory = Persistence.createEntityManagerFactory ("MyPersistenceUnit"); // this is the name of the persistence unit wrote in the persistence.xml file{color}</address>
    <address>{color:#0000ff} EntityManagerr MyEntityManager = JPAemfactory.createEntityManager ();{color}</address>
    bq. <address>{color:#0000ff}// creation of the stored procedure calling string .... one question mark for every param, output included \\ String sql = "{call SP_GETLISTATARIFAS(?,?,?,?,?)}"; \\ // We get the JDBC connection \\ oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl entityManager = (oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl) MyEntityManager; \\ UnitOfWorkImpl uow = (UnitOfWorkImpl)entityManager.getUnitOfWork(); \\ // we create a request to the unitofwork because if dont the connection will not exist \\ uow.beginEarlyTransaction(); \\ Connection conexion = ((UnitOfWorkImpl)uow).getAccessor().getConnection(); \\ {color}{color:#0000ff} \\ try { \\ // Creation of the call and we will identify the params as they are in the stored procedure definitiondefinidos \\ CallableStatement call = conexion.prepareCall(sql); \\ {color}</address>
    bq. <address>{color:#0000ff} \\ // params INPUT with their values \\ call.setString("pIDMCUPO", "125"); \\ call.setString("pCODIGOHOT", "8023"); \\ call.setString("pCODCANAL", "WEB"); \\ call.setString("pCODSUBCANAL", "HOTEL"); \\ {color}</address><address>{color:#0000ff} \\ // params OUTPUT \\ call.registerOutParameter("rRESULTADO", java.sql.Types.VARCHAR); \\ {color}</address><address>{color:#0000ff} \\ // execution \\ call.execute(); \\ {color}</address><address>{color:#0000ff} \\ // getting the response \\ mcontratos_out = call.getString("rRESULTADO"); \\ {color}</address><address>{color:#0000ff} \\ // closing the proc \\ call.close(); \\ {color}</address><address>{color:#0000ff} \\ } catch (SQLException ex) { {color}</address><address>{color:#0000ff} // something you do if there is an error \\ {color}</address><address>{color:#0000ff} \\ } {color}</address>
    Hope this helps all the people that have searched a lot like me.......

    I have my entity manager setup in a singleton.
    I'm finding it's costly to generate the emf, but if I don't close the em (enitity manager) and emf (entity manager factory) my open cursor count climbs until I exceed the max number of open cursors on the database (11g RAC)
    I'm committing the connection, and uow, and closing the em at the end of each call.
    But until I close the emf, the open cursors aren't released.
    TransactionhistoryPkg tranPkg = new TransactionhistoryPkg(conn); //Class created over database package via JPublisher
    tranPkg.transactionhistoryInsSp(insertTrans.getCardId()); // executes db package
    tranPkg.closeConnection();
    conn.commit();
    uow.commit();
    uow.getAccessor().decrementCallCount();
    em.close();
    Am I missing something really obvious here??
    btw - I found this link helpful in troubleshooting the max cursors issue: https://support.bea.com/application_content/product_portlets/support_patterns/wls/InvestigatingORA-1000MaximumOpenCursorsExceededPattern.html

  • Please help - Can not use stored procedure with CTE and temp table in OLEDB source

    Hi,
       I am going to create a simple package. It has OLEDB source , a Derived transformation and a OLEDB Target database.
    Now, for the OLEDB Source, I have a stored procedure with CTE and there are many temp tables inside it. When I give like EXEC <Procedure name> then I am getting the error like ''The metadata  could not be determined because statement with CTE.......uses
    temp table. 
    Please help me how to resolve this ?

    you write to the temp tables that get created at the time the procedure runs I guess
    Instead do it a staged approach, run Execute SQL to populate them, then pull the data using the source.
    You must set retainsameconnection to TRUE to be able to use the temp tables
    Arthur My Blog

  • Using stored procedures with dabasae controls

    Hi. We have two questions.
    Answer 1:
    We are working with Sybase and we are trying to use stored procedures (SP) with databse controls but we don't know how to obtain SP's return. We can to use SP normally if that SP don't have any return. Next example works fine but "stored_procedure_name" actually returns an number (error code) and we need to obtain it:
    * @jc:sql statement="{call stored_procedure_name (?)}"
    Answer 2:
    Do you know how to call SP dinamically? This mean to call an sql statemente where stored_procedure_name and its parameters could be pased as paremeters. That looks as:
    * @jc:sql statement="{call {sql: spName} {sql: listOfParameters}}"
    Thak you very much for your comments.
    Regards.

    I have my entity manager setup in a singleton.
    I'm finding it's costly to generate the emf, but if I don't close the em (enitity manager) and emf (entity manager factory) my open cursor count climbs until I exceed the max number of open cursors on the database (11g RAC)
    I'm committing the connection, and uow, and closing the em at the end of each call.
    But until I close the emf, the open cursors aren't released.
    TransactionhistoryPkg tranPkg = new TransactionhistoryPkg(conn); //Class created over database package via JPublisher
    tranPkg.transactionhistoryInsSp(insertTrans.getCardId()); // executes db package
    tranPkg.closeConnection();
    conn.commit();
    uow.commit();
    uow.getAccessor().decrementCallCount();
    em.close();
    Am I missing something really obvious here??
    btw - I found this link helpful in troubleshooting the max cursors issue: https://support.bea.com/application_content/product_portlets/support_patterns/wls/InvestigatingORA-1000MaximumOpenCursorsExceededPattern.html

  • How to use Stored Procedures with SQLServer2005 and WAS 6.x

    Hi All
    I've got a problem, during the call to a StoredProcedure in SQLServer i've get the next message:
        Exception : com.microsoft.sqlserver.jdbc.SQLServerException: Fetch size cannot be negative
    The stored procedure is working correctly if I run my process out of WAS 6.x but if I get a connection from the pool the process don't work.
    Help please, thanks.

    Your procedure has a single OUT parameter ... and yet it appears you are trying to stuff something into it ... that is never going to work. Additionally everything else about your stored procedure would have gotten you a FAIL grade were you been in my beginning PL/SQL class.
    The syntax, a cursor loop, is obsolete and has been for more than 10 years.
    The formatting and use of case makes even the few lines written hard to read.
    And either no commit ever takes place or you are trying to do incremental commits in origseq: Both of which are bad practice.
    This code should use BULK COLLECT to collect all relevant records into an array and then pass the array to origseq ... no loops ... and end with a commit.
    Demo here: http://www.morganslibrary.org/reference/array_processing.html

  • SSRS 2008 Using Stored Procedure with SysRef Cursor Oracle

    Hi,
    I am new to SSRS.
    I have a ssrs procedure which runs to Return Result of Select Query. ( In form of SYS REF Cursor in Oracle ).
    When I am trying to see the Value in Test Window. It is showing Output. But when I m Running the Report in the environment it is giving me error.
    Please help me if there is a better way of handling it.
    As I read in some forum as SSRS has issue handling SYS Ref Cursor...
    Thanks
    Priyank
    Thanks Priyank Piyush

    Hi Priyank,
    According to your description, you are use a Stored Procedure from SysRef Cursor Oracle as the report dataset. The query works well in Dataset Query Designer, while an error occurs when you render the report.
    As per my understanding, the problem is that there are something wrong with the report design. Please double-check the design of the report. In order to trouble shoot the problem more efficiently, could you please post the detail error message? Then we can
    make further analysis.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Crystal Reports - Using Stored Procedure with c#

    Post Author: cathalmckenna
    CA Forum: Data Connectivity and SQL
    Hey
    I've got some c# code that sets a reports data source.
    Its works when connecting to a data source that is a Table, however when the datasource is a Stored Procedure the following error is generated.
    The table 'PNL_STATUS_REPORT' could not be found.Error in File C:\DOCUME1\mckennac\LOCALS1\Temp\temp_9b3cb2f4-7e37-4e34-bd18-af7b06c85139 {ACBDC2D4-A275-4CAA-B3C0-E3C92F615007}.rpt:The table could not be found.
    The problem is when setting table.Location. I've tried prefixing this with the package name that the stored proc is in, but no luck. If I set the table Location to the package name, I get no error, but the report returns no results.
    Any ideas why this doesnt work, is there a different way to handle stored procs??
                 ConnectionInfo connInfo = new ConnectionInfo();            connInfo.DatabaseName = dbName;            connInfo.ServerName = serverName;            connInfo.UserID = userName;            connInfo.Password = password;                        foreach (Table table in report.Database.Tables)            {                TableLogOnInfo logOnInfo = table.LogOnInfo;                string&#91;&#93; locations = table.Location.Split('.');                string unqualifiedLocation = locations&#91;locations.Length - 1&#93;;                logOnInfo.ConnectionInfo = connInfo;                table.ApplyLogOnInfo(logOnInfo);                table.Location = unqualifiedLocation;            }
    thanks
    Cathal

    Post Author: ianbennett
    CA Forum: Data Connectivity and SQL
    I too am having the same problem.  I have found that when the user has a fast connection it works OK but when they use a "slow" link it does not seem to passs the logon information through before trying to generate the report.

  • BCS External Content Type using Stored Procedure with parameter

    I have a requirement wherein I will be using External Content Type (BCS) using a Stored Procedure.
    The stored procedure has parameters.
    I have set up Read List and Read Item
    However, when I visited my list, I cannot enter any parameter.
    Can you show me a guide on how to configure this with parameters?
    Thanks!
    ----------------------- Sharepoint Newbie

    Hi,
    Here are the references for creating an External Content Type to support Read List and Read Item operations:
    http://troyscott.ca/2010/07/02/creating-an-external-content-type-in-sharepoint-2010/
    https://msdn.microsoft.com/en-us/library/office/ff728816(v=office.14).aspx
    Regards,
    Rebecca Tu
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Using stored procedure with Oracle user-defined types in database control

    Hi,
    I have a requirement where I need to call an Oracle Stored Proc which has IN and OUT parameters. OUT parameters are of user-defined types in Oracle packages.
    I am getting error while calling the Stored proc like below:
    Procedure:
    ==========
    create or replace
    PROCEDURE AA_SAM_TEST (
    col1 out types_aa.aa_tex_type ,
    col2 out types_aa.aa_tex_type ,
    col2 out types_aa.aa_num_type ) As
    Types:
    ======
    create or replace
    package types_aa as
    type aa_tex_type is table of varchar2(255) index by binary_integer;
    type aa_num_type is table of char index by binary_integer;
    end
    Wli Code:
    =========
    DB Control:
    ===========
    * @jc:sql statement="call AA_SAM_TEST(?,?,?)"
    void Call_AA_SAM_TEST(SQLParameter[] param) throws SQLException;
    JPD Code:
    =========
    param = new SQLParameter[3];
    Object param1 = new String();
    Object param2 = new String();
    Object param3 = new String();
    this.param[0] = new SQLParameter(param1 , Types.STRUCT, SQLParameter.OUT);
    this.param[1] = new SQLParameter(param2, Types.STRUCT, SQLParameter.OUT);
    this.param[2] = new SQLParameter(param3, Types.STRUCT, SQLParameter.OUT);
    database_Update.Call_AA_SAM_TEST(this.param);
    I am getting the following error...
    <Jul 24, 2007 6:47:42 PM IST> <Warning> <WLW> <000000> <Id=database_Update; Method=Ctrl_files.Database_Update.Call_AA_SAM_TEST(); Failure=java.sql.SQLException: ORA-06553: PLS-:
    ORA-06553: PLS-:
    ORA-06553: PLS-:
    ORA-06553: PLS-:
    ORA-06553: PLS-:
    ORA-06553: PLS-306: wrong number or typ
    ORA-06553: PLS-306: wrong number or types of arguments in call to 'AA_SAM_TEST'
    ORA-06553: PLS-306: wrong number or types of arguments in call to 'AA_SAM_TEST'
    Can anyone know how to specify OUT parameter of USer-Defined types while using a DB control to access a Stored Proc in Oracle.
    Any help is highly appreciated.
    Thanks

    Hi,
    I have similar problem. Have you already solved the issue?
    Thanks

  • Can Stored procedure with IN and OUT Paramter can be used in JDBC LOOKUP?

    can Stored procedure with IN and OUT Paramter can be used in JDBC LOOKUP?

    Checking online help, I do not see any possibility.
    "Queries a data base by the given SQL statement."
    http://help.sap.com/javadocs/pi/pi711sp03/com/sap/aii/mapping/lookup/DataBaseAccessor.html
    -> execute

  • Calling stored procedures with parameters with the Database Connectivi​ty Toolkit

    Hi all,
    I am new to the forum and am having difficulty finding a solution to a particular problem I am having regarding using the LabVIEW Database Connectivity Toolkit on a project I am currently working on at my job.  I have a database in which I have tables and stored procedures with parameters.  Some of these stored procedures have input, output, and return parameters.
    I have been trying to follow this example but to no avail:  http://digital.ni.com/public.nsf/allkb/07FD1307460​83E0686257300006326C4?OpenDocument
    One such stored procedure I am working on implementing is named "dbo.getAllowablePNs", which executes "SELECT * from DeviceType" (DeviceType is the table).  In this case, it does not require an input parameter, it has an output parameter that generates the table [cluster], and has a return parameter which returns an integer value (execution status code) to show if an error occurred.  The DeviceType table has 3 columns; ID (PK, int, not null), PN (nvarchar(15), null), and NumMACAddresses (int, null).  I have gone over many examples and have talking to NI support to try to implement this and similar stored procedures in LabVIEW but have not been successful.  I am able to connect to the database with the Open Connection VI without error, but am running into some confusion following this step.  I am then trying to use the Create Parameterized Query VI to call the stored procedure and set the parameters.  I assume I would then use the Set Parameter Value VI for each parameter that is wired into the parameters input on the previous Parameterized Query VI?  I am also having some confusion during and following these steps as well.  I would greatly appreciate any advice or suggestions anyone might have in regards to this situation as I am not a SQL expert.  Also, I would be happy to provide any more information that would be helpful.
    Regards,
    Jon
    Solved!
    Go to Solution.

    Also, I don't know if this would be helpful but here is the actual stored procedure in SQL:
    CREATEPROCEDURE [dbo].[getLastSequenceNumber]
    @p1 nvarchar(10)='WO-00000'
    AS
    BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SETNOCOUNTON;
    -- Insert statements for procedure here
    selectmax(SequenceNumber)from Devices where WorkOrderNumber= @p1
    END
    GO

  • Why Dynamic Parameter is not working, when i create report using stored procedure ?

    Post Author: Shashi Kant
    CA Forum: General
    Hi all
    Why Dynamic Parameter is not working, when i create report XI using stored procedure ?
    Only i shaw those parameters which i used in my stored procedure, the parameter which i create dynamic using stored procedure
    is not shown to me when i referesh the report for viewing the results.
    I have used the same procedure which i mention below but can not seen the last screen which is shown in this .
    ============================================================================================
    1. Select View > Field Explorer2. Right-click on Parameter Fields and select New from the right-click menu.3. Enter u201CCustomer Nameu201D as the name for your parameter4. Under u201CList of Valuesu201D select u201CDynamicu201D5. Under the Value column, click where is says u201Cclick here to add itemu201D and select Customer Name from the drop-down list. The dialog shown now look like the one shown below in Figure 1. Click OK to return to your report design.
    Dynamic Parameter Setup6. Next, select Report > Select Expert, select the Customer Name field and click OK.7. Using the drop-down list beside select u201CIs Equal Tou201D and using the drop-down list, select your parameter field (it should be the first field). 8. Click OK to return to your report design and see the parameter dialog.The parameter dialog will appear and show you a dynamic list of values that is updated each time your run your report. It couldnu2019t be easier! In our next tutorial, we will be looking at how to use this feature to create cascading parameter fields, where the values are filtered by the preceding selection.
    Dynamic Parameters in Action
    My question is that whether dynamic parameter is working with storedprocedure or not.
    When i added one table and try to fetch records using dyanmic prameters. after that i am not be able to find the dynamic parameter option when i referesh my report.
    One more thing when i try the static parameter for my report, the option i see when i referesh the screen.
    Please reply soon , it's urgent
    Regards
    shashi kant

    Hi Kishore,
    I have tested the issue step by step by following you description, while the first issue works well in my local environment. Based on my research, this can be caused by the lookup expression or it indeed return Male value based on the logic. If you use the
    expression below, it will indeed only return the Male record. So please try to double-check the record in the two datasets and the expression in your environment:
    =lookup(first(Fields!ProgramID.Value,"DataSet1"),Fields!ProgramID.Value,Fields!Gender.Value,"DataSet2")
    As to the second issue, please try to use the following expression:
    =Count(Lookup(fields!ProgramID.value,fields!ProgramID.value,fields!Gender.value,"DataSet2"))
    Besides, if this issue still exist, in order to trouble shoot this issue more efficiently, could you please post both the .rdl  file with all the size properties to us by the following E-mail address?  It is benefit for us to do further analysis.
    E-mail: [email protected]
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

Maybe you are looking for

  • How i get user info from ldap using java after authenticating user with SSO

    Hi I have one jsp/bean application as a partner application with SSO. It works fine. Now i need to get other attributes of user from LDAP who has logged into the application through SSO. using SSO java APIs i only get username, userDN, subscriber inf

  • Is it possible to link to a specific file in a PDF "package"?

    I'd like to link to a specific file in a PDF "package" from a web page. Is this possible? Thanks.

  • PCIe-6321 frequency measurements

    I am trying to use a PCIe-6321 to perform a simple frequency measurement (800-2500hz).  Are there daqmx functions for frequency measurments?  I tried some of the CVI examples but they throw error messages.  Is there an example were I can measure freq

  • ACL with schedule

    Dear, I have a customer who want deny a service with schedule, he can´t do it on firewall, for this reason he want block a traffic from the main office to a small office across MPLS link. The Idea is deny this traffic on catalyst 4507 that is connect

  • Workspace Deploy

    hi all, When I am selecting Deploy to application server during configuration,workspace is disabled and I am not able to check it... Please reply what is the issue Thanks CM