Added new parm to an existing SQL stored procedure CR 11 doesn't like it

Hi
I have added a new parameter to an existing SQL stored procedure (SQL 2000).  This stored procedure is currently being called from a Crystal XI report.  It prompts for a date which works great.  (The report was created with this parameter).  I added a new parameter to the stored procedure.  When I do a preview in Crystal, it prompts for the new parameter, but is NULL when I look at the SQL query and it brings back no data.  If I try to verify the database, it tells me that I am missing parameter @ProcessType (varchar(5))--(name of new parameter).  I have physically added this parameter to the crystal report with the select expert and still no luck.  I have already tried renaming the procedure but am unable to update datasource location because of this parameter.  The report is very detailed and I do NOT want to create a new report.

Unfortunately, I have tried and retried to do this.  Nothing changes.  I usually would get a message like database has changed, proceeding to fix report.  I don't get this.  It merely tells me database is up to date and only returns the 1 parameter, yet when I go to the datasouce and try to update it, it tells me that I have not supplied the new parameter.
I have tried everything, from closing Crystal reports and then going so far as to reboot my machine, just in case their was some kind of caching going on.
I have even asked other people I work with to look at it to make sure I am not doing something dumb...

Similar Messages

  • Why doesn't SSRS like an IF Statement in my SQL Stored Procedure???

    I have multiple IF Statements at the end of my SQL Stored Procedure Process that utilizes a @ReportTypeName Parameter to produce the chosen report result set
    IF @ReportTypeName = 'HMO-POS New To HFHP - No Prior Year Member Spans'
    BEGIN
    SELECT DISTINCT
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV Member Contract Nbr],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV Member Subscriber Member Nbr],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV Benefit Pkg],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV Benefit Plan Name],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV Division Nbr],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER EFF DATE],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER NBR],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER FIRST NAME],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER LAST NAME],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV Broker Name],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER ADDRESS 1],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER CITY],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER STATE],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER ZIPCODE],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER PHONE1],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER PHONE2],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER PHONE3],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER EMAIL],
    CONVERT(VARCHAR,CAST(CONVERT(VARCHAR, [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER YMDBIRTH]) AS DATETIME),101) AS [INDV MEMBER BirthDate],
    FLOOR((CAST (GETDATE() AS INTEGER) - CAST(CONVERT(DATETIME, CONVERT(CHAR(8), [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER YMDBIRTH])) AS INTEGER)) / 365.25) AS [INDV MEMBER AGE]
    FROM [#TempTable_Distinct_Individual_Member_All_Info]
    WHERE (CHARINDEX('HMO',LTRIM(RTRIM([#TempTable_Distinct_Individual_Member_All_Info].[INDV Benefit Plan Name])),1) > 0
    OR CHARINDEX('POS',LTRIM(RTRIM([#TempTable_Distinct_Individual_Member_All_Info].[INDV Benefit Plan Name])),1) > 0)
    AND [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER NBR] NOT IN
    (SELECT [#TempTable_Distinct_Individual_Member_Prior_Year_Spans].[INDV MEMBER NBR]
    FROM [#TempTable_Distinct_Individual_Member_Prior_Year_Spans])
    ORDER BY [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER NBR]
    END
    IF @ReportTypeName = 'HMO-POS Renewals'
    BEGIN
    SELECT DISTINCT
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV Member Contract Nbr],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV Member Subscriber Member Nbr],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV Benefit Pkg],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV Benefit Plan Name],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV Division Nbr],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER EFF DATE],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER NBR],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER FIRST NAME],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER LAST NAME],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV Broker Name],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER ADDRESS 1],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER CITY],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER STATE],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER ZIPCODE],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER PHONE1],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER PHONE2],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER PHONE3],
    [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER EMAIL],
    CONVERT(VARCHAR,CAST(CONVERT(VARCHAR, [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER YMDBIRTH]) AS DATETIME),101) AS [INDV MEMBER BirthDate],
    FLOOR((CAST (GETDATE() AS INTEGER) - CAST(CONVERT(DATETIME, CONVERT(CHAR(8), [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER YMDBIRTH])) AS INTEGER)) / 365.25) AS [INDV MEMBER AGE]
    FROM [#TempTable_Distinct_Individual_Member_All_Info]
    INNER JOIN [#TempTable_Distinct_Individual_Member_Prior_Year_Spans]
    ON [#TempTable_Distinct_Individual_Member_Prior_Year_Spans].[INDV MEMBER NBR] = [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER NBR]
    WHERE (CHARINDEX('HMO',LTRIM(RTRIM([#TempTable_Distinct_Individual_Member_All_Info].[INDV Benefit Plan Name])),1) > 0
    OR CHARINDEX('POS',LTRIM(RTRIM([#TempTable_Distinct_Individual_Member_All_Info].[INDV Benefit Plan Name])),1) > 0)
    ORDER BY [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER NBR]
    END
    Microsoft Visual Studio and SQL Server Reporting Services did not like this! When I added my dataset and parameters accordingly, my Dataset had no fields...almost as if running the Stored Procedure in the background to get its Metadata was not working. I
    know this works because I tested it as a result of a straight EXEC Command. Why doesn't Microsoft Visual Studio and SQL Server Reporting Services not like this IF? I did end up getting around this by parameterizing the WHERE clause based on the @ReportTypeName
    chosen.
    WHERE (@ReportTypeName = 'HMO-POS New To HFHP - No Prior Year Member Spans'
    AND (CHARINDEX('HMO',LTRIM(RTRIM([#TempTable_Distinct_Individual_Member_All_Info].[INDV Benefit Plan Name])),1) > 0
    OR CHARINDEX('POS',LTRIM(RTRIM([#TempTable_Distinct_Individual_Member_All_Info].[INDV Benefit Plan Name])),1) > 0)
    AND [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER NBR] NOT IN
    (SELECT [#TempTable_Distinct_Individual_Member_Prior_Year_Spans].[INDV MEMBER NBR]
    FROM [#TempTable_Distinct_Individual_Member_Prior_Year_Spans]))
    OR (@ReportTypeName = 'HMO-POS Renewals'
    AND (CHARINDEX('HMO',LTRIM(RTRIM([#TempTable_Distinct_Individual_Member_All_Info].[INDV Benefit Plan Name])),1) > 0
    OR CHARINDEX('POS',LTRIM(RTRIM([#TempTable_Distinct_Individual_Member_All_Info].[INDV Benefit Plan Name])),1) > 0)
    AND [#TempTable_Distinct_Individual_Member_All_Info].[INDV MEMBER NBR] IN
    (SELECT [#TempTable_Distinct_Individual_Member_Prior_Year_Spans].[INDV MEMBER NBR]
    FROM [#TempTable_Distinct_Individual_Member_Prior_Year_Spans]))
    I appreciate your review and am hopeful for a reply.
    Thanks!

    Hi ITBobbyP,
    I have tested on my local environment and can reproduce the issue, the issue can be caused by the temp table you are using which will also cause the data not display.
    I have use below sample table and record to have a test and details information below for your reference:
    Right click the DataSet to select the "DataSet Properties" and click the query designer to execute the stored procedure by click the "!" to check if you can get the data:
    If you got some error, the issue can be cause by the temp table invalid, so please make sure you have add the query to create and insert  recored to temp table like below:
    CREATE PROCEDURE vickytest0311_1
    @ReportTypeName nvarchar(50)
    AS
    create table #VickyTest
    column1 int,
    column2 varchar(20)
    insert into #VickyTest values (1,'Test1')
    insert into #VickyTest values (2,'Test2')
    insert into #VickyTest values (3,'Test3')
    IF @ReportTypeName ='Test1'
    BEGIN
    select * from #VickyTest
    where Column1=1
    END
    IF @ReportTypeName ='Test2'
    BEGIN
    select * from #VickyTest
    where Column1=2
    END
    GO
    3. I recommend you to not use the temp table and you will not need to add the create and insert statement in the stored procedure.
    4. If you still got no data, please try to click the "Refresh fields" as below:
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • Is i possible to base a report on a pl/sql stored procedure

    Is i possible to base a report on a pl/sql stored procedure?
    If Yes please give directions on how to do it.
    /morten

    Hello Morten,
    In Reports 9i, with new feature JDBCPDS its possiable to create a report against a existing stored procedure.
    Using JDBCPDS, user can access any JDBC-enabled data source. You can access database like Oracle, DB2, Sybase, ODBC Data Sources, etc using supporting
    JDBC Drivers. User can also connect ODBC Data Sources like SQL Server, MS-Access, Excel etc.
    User can create a JDBC Query angainst a SQL Query or Stored Procedure in any of mentioned dataSource.
    Following is the syntax of the Oracle Stored Procedure, which can be used as Data Source with JDBCPDS.
    Steps to create a JDBCPDS Report through Report Builder : http://otn.oracle.com:8877/reports/help/ - > JDBCPDS- > How To
    //----------Package definition for Ref cursor ----------/
    package test_Procedure as
    type empcurProcedure5 is ref cursor;
    end test_tryProcedure5;
    // -----------Procedure definition ---------//
    test_Procedure(p_emp_cv out test_tryProcedure5.empcurProcedure5,
    p1 in NUMBER) is
    begin
    update emp set sal=sal + 50 where deptno > P1
    open p_emp_cv for select * from emp where deptno > P1;
    end test_Procedure;
    Procedure first parameter will be Ref Cursor and will be used to return the resultSet to JDBC Query.
    User should create first this procedure in Database. Then in JDBC Query Dialog, user can call this stored procedure by specifying procedure name.
    test_Procedure(40)
    Please see ORACLE_HOME/reports/conf/jdbcpds.conf for more Connection and
    JDBC-Driver information.
    With Regards
    Reports Team

  • How to send a Varying Array param to a PL/SQL Stored Procedure from Java

    * I am VERY new to jdbc, and even somewhat new to Java
    * I'm using Java 1.5, Oracle 10g.
    * I need to call the following PL/SQL Stored Procedure from Java:
    procedure setEventStatus
    i_deQueueStatus in deQueueStatus_type
    *deQueueStatus_type is the following (an array of deQueueStatus_OBJ):
    CREATE OR REPLACE TYPE deQueueStatus_OBJ as object
    eventID number (20),
    dequeuestatus varchar2(20)
    CREATE OR REPLACE TYPE deQueueStatus_TYPE IS VARYING ARRAY(500) of deQueueStatus_obj
    *I have created a Java object as follows:
    public class EventQueueDeQueueStatus
         long      eventID;
         String      dequeueStatus;
         EventQueueDeQueueStatus(long eventID, String dequeueStatus)
              this.eventID = eventID;
              this.dequeueStatus = dequeueStatus;
    I have an ArrayList of these.
    I need to pass this list to the Stored Procedure. How do I create a java.sql.Array so I can call CallableStatement.setArray to set the parameter? Or do I use something else? I have tried setObject with both the ArrayList and also with a primitive array, but got "Invalid Column Type" both times.
    Any help would be greatly appreciated. I just got this task today, and I have to make it work by Tuesday :-( !
    Thanks,
    Kathy

    Kathy,
    Search the archives of this forum and the JDBC forum for the terms STRUCT and ARRAY and you can find some sample code on the JDBC How-To Documents page and the JDBC Samples which can both be accessed from this page:
    http://www.oracle.com/technology/tech/java/sqlj_jdbc/index.html
    Good Luck,
    Avi.

  • APEX - accepting OUT variable values from PL/SQL Stored Procedure

    I have created a page (Form) which is accepting values text fields.
    In the Page Processing section under Processing, I am passing the values to a PL/SQL Stored Procedure, which acts like an API. The procedure contains code to validate the entered data and finally insert the data into the base tables. The procedure also contains OUT variables in the parameter that would return status of processing and any error messages.
    Now, my question is, how can I make the page accept these OUT variables from the procedure. What I wish to do is, to capture these messages/processing status from the procedure in the page. For example, if there is a error in the data and the procedure is sending this message in the OUT variable, I need this to be displayed on the page as an error message.
    Is this possible in APEX?
    Regards,
    Santhosh Jose

    Hi VC,
    I just tried putting the string directly instead of the variable. Its still not giving me the expected results.
    HOWEVER, I think the reason was because of the EXCEPTION block in my code. I have an EXCEPTION block to handle exceptions. I commented the WHEN OTHERS section and now the error message is coming on the page.
    So what I have done now is as follows: At the point at which the error is expected, I am raising a handled exception. And within the exception handling, I am giving RAISE_APPLICATION_ERROR.
    WHEN ex_main_error*
    THEN*
    p_status := 2;*
    p_msg := 'ERROR Stage: '||lc_err_stage||' ERROR Message: '||lc_err_msg;*
    RAISE_APPLICATION_ERROR (-20001, p_msg);*
    This is working now! Which is very good news. Thanks once again for your help!
    Regards,
    Santhosh Jose

  • How to create an External Content Type with SQL Stored Procedures Parameters and query it in a SharePoint App

    Hi,
    I'm new to SharePoint 2013 I want to be able to query a MSSQL database from a SharePoint App I have tried to create an External Content Type (ECT) which is produced from a MSSQL stored Procedure, this procedure has several parameters which are needed to
    filter the data correctly.  From here I want to produce an external list which I can then query from a c# SharePoint app.  If I leave the filters in the ECT null then the list is of course empty or if enter a default values the results are limited
    for the app to query so are no good.
    I want to dynamically pass values to the ECT when querying from the app, is this not possible.  Should I just be returning everything in an external list and then letting the query in the app filter the data, this seems inefficient?
    Is this the best way to do this or should I be doing this differently?
    Please can someone point me in the right direction.
    Thanks

    Hi Pandra801,
    When you create a the external content type, please try to add a filter based on your select statement.
    http://arsalkhatri.wordpress.com/2012/01/07/external-list-with-bcs-search-filters-finders/
    Or, try to create a stored procedure based on your select statement, then create ECT using the SQL stored procedure.
    A step by step guide in designing BCS entities by using a SQL stored procedure
    http://blogs.msdn.com/b/sharepointdev/archive/2011/02/10/173-a-step-by-step-guide-in-designing-bcs-entities-by-using-a-sql-stored-procedure.aspx
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Tables from different shema in pl/sql stored procedure

    I whant to use table from another shema in my pl/sql stored procedure like this:
    create procedure proc1(...) is
    cursor c1 is
    select * from scott.emp;
    begin
    end;
    This generated error:
    PLS-00201: identifier 'scott.emp' must be declared.
    I try to use public synonym for scott.emp, but the same error is appear.
    What can i do in this case?
    Thanks.
    null

    Hi
    You haven't rights to select scott.emp but there is no messages that 'You have not rights to select xxxx'. When you haven't rights for an objects it does not exists for you.
    Regards
    null

  • Error calling PL/SQL stored procedure

    Hi,
    I'm pretty new to JDeveloper having used NetBeans for the last few years.
    I'm getting an error when trying to call a PL/SQL stored procedure. When I click on any of the oracle errors I get an "unable to find source file" message. The errors occurs in call.execute(). The error message and Java code are listed below. Any help is much appreciated.
    Cheers,
    Stevie
    Errors:
    Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 33
         at java.lang.String.charAt(String.java:558)
         at oracle.jdbc.driver.OracleSql.handleODBC(OracleSql.java:877)
         at oracle.jdbc.driver.OracleSql.parse(OracleSql.java:811)
         at oracle.jdbc.driver.OracleSql.getSql(OracleSql.java:284)
         at oracle.jdbc.driver.OracleSql.getSqlBytes(OracleSql.java:538)
         at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:169)
         at oracle.jdbc.driver.T4CCallableStatement.execute_for_rows(T4CCallableStatement.java:873)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1161)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3001)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3093)
         at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4286)
         at oracle.CallPLSQL.callLMO(CallPLSQL.java:118)
         at oracle.TestHarness.main(TestHarness.java:18)
    Jave Code:
    package oracle;
    import java.sql.CallableStatement;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import java.sql.Types;
    public class CallPLSQL {
    private Connection conn;
    public CallPLSQL() {
    *Constructor.
    try {
    //Register Oracle Database Drive
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    //set connection
    String connectionString="jdbc:oracle:thin:TSD/TSD@DEV:1526:DEVELOP";
    this.setConn(DriverManager.getConnection(connectionString,"TSD", "TSD"));
    } catch (SQLException ex) {
    public int callproc () throws SQLException {
    CallableStatement call;
    String callString = "{call proc" +
    call = conn.prepareCall(callString);
    call.setInt(1, 120289);
    call.setInt(2, 2008);
    call.registerOutParameter(3, Types.INTEGER);
    call.registerOutParameter(4, Types.INTEGER);
    call.registerOutParameter(5, Types.INTEGER);
    call.registerOutParameter(6, Types.DATE);
    call.registerOutParameter(7, Types.VARCHAR);
    call.registerOutParameter(8, Types.INTEGER);
    call.registerOutParameter(9, Types.INTEGER);
    call.execute();
    int i = call.getInt("app_id");
    return i;
    public void setConn(Connection conn) {
    this.conn = conn;
    public Connection getConn() {
    return conn;
    }

    I've fixed it now. I'd missed a } in prepareCall. What a doughball.

  • MS SQL Stored Procedure problem

    Hi,
    I am using BO XI R2, Crystal Report XI and MS SQL Database.
    I found a strange error when generating the report using my java application if the crystal report is using MS SQL stored procedure. The error encountered :
    com.crystaldecisions.sdk.occa.managedreports.ras.internal.a: Cannot open report document. --- Custom table prefix specified in the InfoStore does not exist.  This is a configuration problem. Please contact your system administrator.
    cause:com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: Custom table prefix specified in the InfoStore does not exist.  This is a configuration problem. Please contact your system administrator.---- Error code:-2147467259 Error code name:failed
    detail:Cannot open report document. --- Custom table prefix specified in the InfoStore does not exist.  This is a configuration problem. Please contact your system administrator.
    This is when the code executed is:
       reportClientDocument = reportAppFactory.openDocument(report, 0, Locale.ENGLISH);
    If the report does not use the stored procedure, it's ok.
    If i run the report  (with stored procedure) from CMC using the default table prefix (in database config tab), it's able to generate the report.
    If i select custom table prefix and specify the custom table prefix value with the same value as in the default table prefix, it could not generate the report and error stated that the table could not be found.
    Please enlighten me if you have use MS SQL database for reporting with BO XI R2.
    Thanks.

    That means it's not a SDK-specific error. 
    Once it's resolved in InfoView, it'll likely be resolved with your app.
    You might want to open a support case with SAP. 
    Sincerely,
    Ted Ueda

  • Actuate 7 PL/SQL Stored Procedure Call Before the Report Run.

    Hi,
    I need a small help to call a pl sql stored procedure in actuate 7.
    I wrote a code a on component content
    Function runProc(procName as String, connection As AcDBConnection )
    ' Insert your code here
    Dim statement As AcDBStatement
    Dim results as string
    ' Prepare statement
    Set statement = connection.Prepare("BEGIN " & procName & "; END;" )
    If statement Is Nothing Then
    results = "Failed to prepare statement."
    results = results & " " & connection.GetSpecificErrorText( )
    results = results & " " & connection.GetGeneralErrorText( )
    Exit sub
    End If
    ' Execute sprocoutparam
    If statement.Execute() = 0 Then
    results = "Stored procedure " & procName & "execution failed."
    results = results & " " & connection.GetSpecificErrorText( )
    results = results & " " & connection.GetGeneralErrorText( )
    Else
    results = "Stored procedure " & procName & " execution success."
    End if
    ShowFactoryStatus(results)
    End FunctionNow this Code I am calling on the Chart Start Method
    Sub Start( )
        Super::Start( )
        ' Insert your code here
        Dim ProcName as String
        Dim connectionObject As AcDBConnection
        ProcName="DELETECUSTOMER(1234)"
        runProc(ProcName, connectionObject )
    End SubNow when i Run the Report i get this Error !
    NewReportApp::Frame::Chart%Start(9): Invalid procedure reference. - (runProc)
    1 Semantic Error(s) found
    Thanks,
    Asif

    hi,
    Finally Figured Out Here....
    Steps to Call the Stored Procedure In Actuate 7
    1 – Right Click on Content – Frame and go to properties and method Tab.
         1 – Click on New Button to you create own custom method.
         2 – Write the following code :
    Sub runProc(procName as String, connection As AcDBConnection )
         Dim statement As AcDBStatement
         Dim results as string
         Set connection = GetConnection()
         'Prepare statement
         Set statement = connection.Prepare("BEGIN " & procName & "; END;" )
              If statement Is Nothing Then
                   results = "Failed to prepare statement."
                   results = results & " " & connection.GetSpecificErrorText( )
                   results = results & " " & connection.GetGeneralErrorText( )
                   MsgBox "Procedure Not Called....Badddddd"
                   Exit sub
              End If
         ' Execute sprocoutparam
              If statement.Execute() = 0 Then
                   results = "Stored procedure " & procName & "execution failed."
                   results = results & " " & connection.GetSpecificErrorText( )
                   results = results & " " & connection.GetGeneralErrorText( )
                   MsgBox "Procedure Not Called....Badddddd" & results
              Else
                   results = "Stored procedure " & procName & " execution success."
                   MsgBox "Procedure Called....Wowwww"
              End if
              ShowFactoryStatus(results)
    End Sub2 – Now let call the stored procedure before our actual report query runs.
         1 - Right Click on Content – Frame and go to properties and method Tab.
         2 - Select the Start Method and Click on Override button.     
         3 - Write the following code:
    Sub Start( )
         Dim ProcName as String
         Dim connectionObject As AcDBConnection
         Set connectionObject = GetConnection()
         ProcName="XXTEST ()"
         runProc( ProcName, connectionObject )
        Super::Start ( )
    End Sub3 – Now design your report as usual using the Textual Query window.

  • Big PL/SQL stored procedure optimization.

    Hi There,
    Can any one let me the basic steps for optimization or tuning of a PL/SQL stored procedure for better performance.
    DB: 11.2.0
    OS: Solaris 10
    looking forward.
    Regards,

    >
    Can any one let me the basic steps for optimization or tuning of a PL/SQL stored procedure for better performance.
    >
    Seriously - how do you expect anyone to give you any specific things to do when you don't provide any specific information about your procedure?
    A procedured is comprised of one or more steps. So to tune it you need to determine which steps are 'slow' and make them 'fast'! ;)
    There are several common causes of performance problems with PL/SQL are:
    1. Using PL/SQL when SQL should have been used. Don't use PL/SQL to begin with - always use SQL unless it just can't do the job required. The 'PL' in PL/SQL means 'Procedural Language' and should be used for transactional (multi-step) processing or when 'procedural' operations are needed that aren't available in SQL.
    2. Using slow-by-slow (row by row) processing instead of BULK processing.
    3. Using multiple nested LOOPs when a more complex query could have allowed a single loop to be used.
    4. Using COMMITs more frequently than required. Search this forum and you will find far too many questions about how to do a COMMIT after 10,000 rows (or some other number). A COMMIT should be performed AFTER a transaction has been completed, not during the middle of it. Frequent commits generally use more resources, degrade performance and risk the famous 'snapshot too old' message.
    The very first step of performance 'tuning' is to first verify that any 'tuning' is even required. Too many people suffer from CTD - compulsive tuning disorder.
    The second step is to identify what step, or steps, of the process are performing below par.
    Which means the best developers are proactive - they plan ahead.
    1. Create an explain plan BEFORE the code goes to production. Once the code has been tested and believed to perform properly an execution plan should be created and SAVED for future reference. That saved plan can then be used later, when you suspect a performance issue, to detect changes that might have affected performance: create a new plan and compare it to the baseline.
    2. Create explains for ALL key queries. As suggested by step #1 performance is all about comparison: performance 'now' COMPARED TO performance 'then'. If the don't know the performance 'then' it can be difficult to know if the performance has changed. If a query has a 'now' execution time of 2 minutes is that 'fast' or 'slow'? Well - compared to WHAT? You can't know 'fast' or 'slow' if you don't know 'then' and 'now'. How fast was it yesterday, last week or last month?
    3. Instrument your procedural code. That means measure, for EACH STEP, how long it took to execute and how much data it worked with. That information needs to be logged. Your logging and data collection can be static (it ALWAYS happens) or dynamic. Oracle's own code is HEAVILY instrumented. Some operations and activity are always logged and available in the data dicitionary views or various performance reports such as AWR.
    Other operations, such as the extended trace facility, only collect data on request.
    IMHO your first step should be to begin the 'proactive' steps above.

  • Pl/sql stored procedure code2 check the emial id is correct or not

    if the mail id is [email protected]@.com
    then how we do validations means
    there must be only one @
    i wnat all tghis type of validations 2 check the email id is correct or not?
    the procedure that i wnat to validate akll the validations

    This appears to be a duplicate of your existing thread
    pl/sql stored procedure for email id validations
    I'll answer there.
    Justin

  • Unable to use the values returned by a PL/SQL stored procedure in a XSQL page

    Hi,
    I've been messing around with XML and XSQL in particular. I was trying to write a xsql page to display a report with account totals...I have the following .xsql which calls a PL/SQL stored procedure :
    <?xml version="1.0"?>
    <xsql:query connection="pfcdm" xmlns:xsql="urn:oracle-xsql">
    <xsql:set-session-param name="zasset_total" value="100">
    <xsql:dml connection="pfcdm">
    rraman.sp_vw_id(zasset_total,zinvm_total,zmkt_val);
    </xsql:dml>
    </xsql:set-session-param>
    select 'Asset total is {@zasset_total}' as "ASSET_TOTAL" from dual
    </xsql:query>
    My procedure sp_vw_id returns the values that it should. But, I am not sure how to declare variables within a page, and to output the return values. There is very scanty documentation on the usage of <xsql:dml> or <xsql:ref-cursor-function>.
    Any response would be greatly appreciated.
    Thanks,
    Raja

    Here is the example from the Oracle9i (complete rewrite) of the XSQL Chapter in our Oracle documentation.
    Question
    I using <xsql:dml> to call a stored procedure which has one OUT parameter, but I was not able to see any results. The executed code results in the following statement:
    <xsql-status action="xsql:dml" rows="0"/>
    Answer
    You cannot set parameter values by binding them in the position of OUT variables in this release using <xsql:dml>. Only IN parameters are supported for binding. You can create a wrapper procedure that constructs XML elements using the HTP package and then your XSQL page can invoke the wrapper procedure using <xsql:include-owa> instead.
    For an example, suppose you had the following procedure:
    CREATE OR REPLACE PROCEDURE addmult(arg1 NUMBER,
    arg2 NUMBER,
    sumval OUT NUMBER,
    prodval OUT NUMBER) IS
    BEGIN
    sumval := arg1 + arg2;
    prodval := arg1 * arg2;
    END;You could write the following procedure to "wrap" it, taking all of the IN arguments that the procedure above expects, and then "encoding" the OUT values as a little XML datagram that you print to the OWA page buffer:
    CREATE OR REPLACE PROCEDURE addmultwrapper(arg1 NUMBER, arg2 NUMBER) IS
    sumval NUMBER;
    prodval NUMBER;
    xml VARCHAR2(2000);
    BEGIN
    -- Call the procedure with OUT values
    addmult(arg1,arg2,sumval,prodval);
    -- Then produce XML that encodes the OUT values
    xml := '<addmult>'&#0124; &#0124;
    '<sum>'&#0124; &#0124;sumval&#0124; &#0124;'</sum>'&#0124; &#0124;
    '<product>'&#0124; &#0124;prodval&#0124; &#0124;'</product>'&#0124; &#0124;
    '</addmult>';
    -- Print the XML result to the OWA page buffer for return
    HTP.P(xml);
    END;This way, you can build an XSQL page like this that calls the wrapper procedure:
    <page connection="demo" xmlns:xsql="urn:oracle-xsql">
    <xsql:include-owa bind-params="arg1 arg2">
    BEGIN addmultwrapper(?,?); END;
    </xsql:include-owa>
    </page>This allows a request like:
    http://yourserver.com/addmult.xsql?arg1=30&arg2=45
    to return an XML datagram that reflects the OUT values like this:
    <page> <addmult><sum>75</sum><product>1350</product></addmult>
    </page>

  • PL/SQL Stored procedures vs C# code.

    Hi All
    We are going to start designing a kind of transactional application with huge volume of data (150 million records per month). Our selected DB engine is Oracle 10.g while C# is selected development language.
    Because of big volume of data performance is one of the most important factors for us, and the technical design should gain the best level of performance.
    What i'm looking for and studing for it is to define which kind of operation shall be done by Stored Procedure which will be written by PL/SQL or by C# classes?
    I don't interested in to handle complicated and complex jobs using PL/SQL stored procedures while the performance really deserve it.

    Hello,
    Well, my philosophy is to leverage the database as much as possible. I have worked with applications that had no "select", "insert", "update" or "delete" statements in them. Instead, stored procedures and functions inside of PL/SQL packages and bodies were used. Some people will argue strongly against that, but I belong to the "thick database" group rather than the "the database is just a persistence layer that I have to deal with" group. To me it makes sense to co-locate the code that works on the data with the data. If you are working with large volumes of data, I find the bulk operations available via PL/SQL to be very handy.
    Here's an AskTom thread that deals with this general issue:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:12083187196917
    Whilst the thread is primarily about Java, you can substitute just about any other language and the meaning will still carry over.
    Regards,
    Mark

  • How to bind arrays to PL/SQL stored procedure using OCI?

    Hi,
    We are having problems trying to bind arrays to PL/SQL stored procedure using OCI. Here is the situation:
    - We have a stored procedure called "GetVEPFindTasks" with the following interface:
    PROCEDURE GetVEPFindTasks (
    p_ErrorCode OUT NUMBER,
    p_ErrorMsg OUT VARCHAR2,
    p_RowCount OUT NUMBER,
    p_VEPFindTasks OUT t_VEPFindTaskRecordTable,
    p_MaxTask IN NUMBER);
    t_VEPFindTaskRecordTable is a record with the following entries:
    TYPE t_VEPFindTaskRecord IS RECORD (
    RTCID NUMBER,
    TransNum NUMBER,
    TransTimestamp VARCHAR2(20),
    Pathname1 image_data.pathname%TYPE,
    Pathname2 image_data.pathname%TYPE,
    Pathname3 image_data.pathname%TYPE,
    OperatorID operator.id%TYPE);
    - Now, we are trying to call the stored procedure from C++ using OCI (in UNIX). The call that we use are: OCIBindByName and OCIBindArrayOfStruct to bind the parameters to the corresponding buffers. We bind all parameters in the interface by name. Now, we do bind the record's individual item by name (RTCID, TransNum, etc.), and not as a record. I don't know if this is going to work. Then, we use the bind handles of the binded record items (only record items such as RTCID, TransNum, and NOT error_code which is not part of the record) to bind the arrays (using OCIBindArrayOfStruct).
    All of the parameters that are binded as arrays are OUTPUT parameters. The rest are either INPUT or INPUT/OUTPUT parameters. Now, when we try to execute, OCI returns with an error "Invalid number or types of arguments" (or something to that sort... the number was something like ORA-06550). Please help...
    Is there any sample on how to use the OCIBindArrayOfStruct with PL/SQL stored procedures? The sample provided from Oracle is only for a straight SQL statement.
    Thank's for all your help.
    ** Dannil Chan **

    As you said:
    You have to pass in an array for every field and deconstruct/construct the record in the procedure. There is no support for record type or an array of records. Can you give me a example? I'am very urgently need it.
    thanks
    email: [email protected]

Maybe you are looking for

  • Problem with DigiChat and java

    I can't get into a chat room because of a problem with digichat and java

  • Home sharing problem with music between iTunes and Apple TV

    iTunes 10.5.2.11 Apple TV2 running 4.4.4 (3330) Windows 7 pc WI FI connection Apple TV is losing its connection to iTunes on my windows 7 pc after streaming EXACTLY TWO SONGS.   I've never had this problem until the last update of iTunes to 10.5.2.11

  • TS1717 Itunes crashes on Windows 7 64 bit

    Itunes is crashing when I try playback of a DVD.  I'm using Itunes 11.0.2.26 on Windows 7 64 bit.

  • Throwing error msg in selection screen

    Hi all, I want to throw one error message in selection screen . This message is of more than 1000 chars.   and i want to show these 1000 chars in  a pop up window and when i press 'TICK' mark, it should stay only in the selection screen . It should n

  • Canon EOS-1D X vs. EOS-5D MK III - Which camera do you prefer ?

    Canon has two excellent full frame cameras occupying their higher end of the DSLR market. They are the EOS-1D X and the EOS-5D MK III. I have been using Canon equipment for about 25 years now and started with the EOS-1 series when it first came out i