DDL in stored procedures: why not?

Hi all...
I am an Oracle beginner and am using 8i to return data from oracle to ASP pages via ADO and ODBC.
I created the necessary packages in my Oracle tablespace and they contained DDL - I have a very complex query which I don't want to have to encapsulate in one select statement. I want to create a number of temporary tables to store the intermediate data returned from the DB. Therefore I need to be able to have 'create table <name> as...' in my package. Once all the tables have been created I then want to drop them at the end of the procedure. This seems perfectly reasonable to me - what is the use of a stored procedure if you can create or drop a table?!?!
So, my question is this: why is it that you can't have DDL in a package or stored procedure? I'm pretty sure both SQL Server and Sybase allow DDL in a stored proc - so why doesn't Oracle allow it?
And if you really can't have DDL in an sp then what is the alternative?
Hoep someone can help out a rank beginner here - thanks!!
Mike.

<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Rasmus Mencke ([email protected]):
Hi,
You can use dynamic sql, it is very easy to do what you are trying to accomplease.
Procedure test is
sql_stmt varchar2(200); -- Variable to hold sql string
BEGIN
-- Create the SQL Statement
sql_stmt := 'create table tmp (id number(1), text varchar2(200));'
-- Fire the SQL Statement
execute immediate sql_stmt;
sql_stmt := 'drop table tmp';
execute immediate sql_stmt;
END;
<HR></BLOCKQUOTE>
Thanks Rasmus - I tried it but got errors. As you can see from the code below I am using a cursor to store the data to return to ADO in tables. To give you an idea of what I want to do here is my package body spec:
CREATE OR REPLACE PACKAGE BODY Network_Elements_Report
AS
Procedure GetNetworkElements (
i_Node IN VARCHAR2,
NE_Node OUT tblNE_Node,
NE_Type OUT tblNE_Type,
EHA OUT tblEHA,
Status OUT tblStatus,
Curr_Func OUT tblCurr_Func,
TP_Name OUT tblTP_Name,
Order_Name OUT tblOrder_Name,
Required_Start OUT tblRequired_Start,
Required_End OUT tblRequired_End,
Trail_Name OUT tblTrail_Name);
SQL_stmt varchar2(200);
IS
CURSOR nerep_cur IS
-- Just a simple execute immediate test!
-- Actual SQL to go here much more
-- complicated!!
SQL_stmt := 'create table tmp as select * from nerep4;';
execute immediate SQL_stmt ;
SELECT NE_Node, NE_Type, EHA, Status, Curr_Func, TP_Name,
Order_Item_Name, Required_Start, Required_End, Trail_Name
FROM tmp
WHERE NE_Node = i_Node
SQL_stmt = 'drop table tmp;';
execute immediate SQL_stmt ;
recCount NUMBER DEFAULT 1;
BEGIN
FOR NE_Rec IN nerep_cur
LOOP
NE_Node(recCount) := NE_Rec.NE_Node;
NE_Type(recCount) := NE_Rec.NE_Type;
EHA(recCount) := NE_Rec.EHA;
Status(recCount) := NE_Rec.Status;
Curr_Func(recCount) := NE_Rec.Curr_Func;
TP_Name(recCount) := NE_Rec.TP_Name;
Order_Name(recCount) := NE_Rec.Order_Item_Name;
Required_Start(recCount) := NE_Rec.Required_Start;
Required_End(recCount) := NE_Rec.Required_End;
Trail_Name(recCount) := NE_Rec.Trail_Name;
recCount := recCount + 1;
END LOOP;
END GetNetworkElements;
END Network_Elements_Report;
When I run this I get Oracle error:
"PLS-00103: Encountered the symbol "CURSOR" when expecting one of the following..." etc, etc.
What have I got wrong here? Also, given that the actual SQL I want to execute is around 40 lines long and it creates 4 temp tables, can I store this is a seperate .SQL file and use execute immediate to use the contents of the SQL file? eg: execute immediate nerep.sql - I guess I mean like some sort of 'include' file.
Hope this is slightly clearer than mud!!
Thanks for your help...
Mike.
Bear in midn that
The actual SQL I will have in

Similar Messages

  • Stored Procedure Does Not Run Properly When Called From Portlet

    We have a simple Java portlet that calls a PL/SQL stored procedure which we wrote. The stored procedure sends a large number of emails to users in our corporation using the "utl_smtp" package. The stored procedure returns a count of the emails back to the Java portlet when it's finished. This number is displayed in the portlet.
    Our problem:
    The stored procedure functions as expected when run from a PL/SQL block in SQL*Plus, and the Java portlet calls the procedure properly when sending out a smaller number of emails (Less than 200 usually). When we get into a higher number of emails the procedure hangs when called from the portlet, but it STILL functions properly from SQL*Plus. It does not return the number of emails sent
    and the Java portlet is unable to return a SQLException. Also, we have noticed that emails are sent at a much slower pace from the stored procedure when it's called from the portlet.

    Any Ideas?

  • Fields in Stored Procedure does not appear in Crystal reports 2008.

    hi,
    I am now using crystal reports 2008 evaluation copy for 30 days. I am trying to create a stored procedure with parameter, here is my sample Stored Procedure code;
    DELIMITER $$
    DROP PROCEDURE IF EXISTS `puerto`.`SP_FindEmployees`$$
    CREATE DEFINER=`root`@`localhost` PROCEDURE `SP_FindEmployees`(SIDNo VARCHAR(10))
    BEGIN
         SELECT * FROM employees WHERE IDNo=SIDNo;
        END$$
    DELIMITER ;
    when i try to call the procedure in sqlyog here is my sample code;
    CALL sp_findemployees('0000000001')
    it is successfull, but when i try to  connect it with crystal reports 2008 I got no fields in my stored procedure andi got this error message ;
    "Database Connector: 'HY00:[MySQL][ODBC 3.51 Driver][mysqld-5.1.33-community]incorect number of arguments for procedure puerto.sp_findemployees; expected 1, got 0 [Database vendor code: 1318]"
    CR2008 was not asking a parameter values.
    But when I try using stored procedure that i've made in MSSQL, CR2008 asking parameters and succefully created the reports needed.
    My Objective is to make a stored procedure  in MySQL by using select statement and filter it with parameter(s) that I will pass and CR2008 will use this stored procedure.
    i also try the view with this code below and it was successfull in CR2008.
    DELIMITER $$
    DROP VIEW IF EXISTS `puerto`.`ep_employees`$$
    CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `ep_employees` AS (SELECT `employees`.`IDNo` AS `IDNo`,`employees`.`FullName` AS `FullName` FROM `employees`)$$
    DELIMITER ;

    hi,
    Crystal Reports 2008 and MySQL 5 , ODBC driver 3.5 and ODBC driver 5.1.
    I use ODBC connector 3.5 because I got errors in ODBC drivers in 5.1.
    Do you have step by step procedure for creating add command dialog box?
    I try creating the add command dialog box
    here's my sample sql statement i don't know if its correct because no data appearing in my crystal report
    Select * from employees where idno=@IDNo
    in Command Parameter Dialog Box
    Parameter Name = @IDNo
    Prompting Text = @IDNo
    Value Type = String
    DefaultValue = 0
    thanks!

  • Custom report stored procedure changes not reflecting

    Hi,
    I have a custom report which works fine but now I want to do some changes in stored procedure. The stored procedure compiles successfully but the changes are not reflected in the report. Am I missing out something as I am assuming that once the stored procedure is saved, the changes must reflect immediately.
    Regards,
    Rahul Sharma

    I did some changes in the where clause to include few more input parameters and thats it. I have not changed anything else. Moreover, even if I try to introduce an error intentionally, OIM is not picking it up. Is there any other reference which I need to change?

  • Stored procedure call not working

    I have  2 ms-sql update statement through stored procedures
    1) as a batch update
    if (vendorBillDetailsDTO != null) {
                   stmnt =
                        con.prepareCall(
                             "Exec usp_CMP_UpdPRDetails ?, ?, ?, ?");
                   Iterator it = vendorBillDetailsDTO.iterator();
                   while (it.hasNext()) {
                        VendorBillDetailsDTO myVendorBillBillDetailsDTO =
                             (VendorBillDetailsDTO) it.next();
                        stmnt.setInt(
                             1,
                             myVendorBillBillDetailsDTO.getBillDetailRef().intValue());
                        stmnt.setInt(
                             2,
                             myVendorBillBillDetailsDTO.getBillId().intValue());
                        stmnt.setString(3, myVendorBillBillDetailsDTO.getCRN());
                        stmnt.setInt(
                             4,
                             myVendorBillBillDetailsDTO.getServiceCode().intValue());
                        stmnt.setString(5, myVendorBillBillDetailsDTO.getPRShortText());
                                  stmnt.addBatch();
                        //it.next();
                   } //while
                   stmnt.executeBatch();
              } //if
    This  block is working perfectly fine and statement is correctly getting executed
    2)     if (vendorBillHeaderDTO != null) {
                   stmnt =     con.prepareCall(
                             "Exec usp_CMP_UpdPRHeader ?,?,?");
                   stmnt.setInt(1, vendorBillHeaderDTO.getBillId().intValue());
                   stmnt.setString(2, vendorBillHeaderDTO.getBillType());
                   stmnt.setString(3, vendorBillHeaderDTO.getEstimateReference());
    stmnt.executeUpdate();
    }//end if
    This statement is not getting executed (I have many input parameters like  int , timestamp , long , double etc). It is not throwing any error (Even when I  enclosed it with try catch theere is no exception thrown .)  However in back end record is not getting updated .
    Any ideas ? 
    Please help
    NPB

    Well, that could be a problem in the Data Base side, i suggest you:
    1) See the log file of your DB,
    2) Run in your DB the Store Procedure, maybe you forget put a commit, and see that of this way you can update the table you can.
    Try it.
    Regards if helps you
    Josué Cruz

  • Stored procedure does not work!

    okay, this is one of the weirdest things i have ever seen...so i have created a registration page to my code which on submit it will fire the following codes
    protected void btsSubmit_Click(object sender, EventArgs e)
    if (tbxFName.Text.Trim().Length == 0 || tbxLName.Text.Trim().Length == 0 || tbxUsername.Text.Trim().Length == 0 || tbxPassword.Text.Length == 0)
    ScriptManager.RegisterStartupScript(this, this.GetType(), "myscript", "ShowNotification('Warning','Please fill the required textboxes');", true);
    else
    try
    string conString = ConfigurationManager.ConnectionStrings["IRELDBCS"].ConnectionString;
    using (SqlConnection con = new SqlConnection(conString))
    SqlCommand sc = new SqlCommand("spUserRegister", con);
    sc.CommandType = CommandType.StoredProcedure;
    sc.Parameters.AddWithValue("@a", tbxFName.Text.Trim());
    sc.Parameters.AddWithValue("@b", tbxLName.Text.Trim());
    sc.Parameters.AddWithValue("@c", tbxUsername.Text.Trim());
    sc.Parameters.AddWithValue("@d", tbxPassword.Text);
    sc.Parameters.AddWithValue("@e", ddlUserType.SelectedValue);
    con.Open();
    int ReturnCode = (int)sc.ExecuteScalar();
    if (ReturnCode == -1)
    ScriptManager.RegisterStartupScript(this, this.GetType(), "myscript", "ShowNotification('Error','This user is already exists.');", true);
    else
    ScriptManager.RegisterStartupScript(this, this.GetType(), "myscript", "ShowNotification('Success','you registration was successful');", true);
    catch
    ScriptManager.RegisterStartupScript(this, this.GetType(), "myscript", "ShowNotification('Error','Something went wrong, please try again in a few minutes');", true);
    i was using sc.ExecuteNonQuery(); instead of int ReturnCode = (int)sc.ExecuteScalar();
    and it was working fine and it was functioning till i have added the part which it stops user from registering with the same email address which is 
    int ReturnCode = (int)sc.ExecuteScalar();
    if (ReturnCode == -1)
    ScriptManager.RegisterStartupScript(this, this.GetType(), "myscript", "ShowNotification('Error','This user is already exists.');", true);
    else
    ScriptManager.RegisterStartupScript(this, this.GetType(), "myscript", "ShowNotification('Success','you registration was successful');", true);
    and this is my stored procedure
    USE [dbo.IrELearn]
    GO
    /****** Object: StoredProcedure [dbo].[spUserRegister] Script Date: 04/01/2014 19:35:08 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER PROCEDURE [dbo].[spUserRegister]
    @a nvarchar(30),
    @b nvarchar(50),
    @c nvarchar(150),
    @d nvarchar(30),
    @e smallint
    as
    BEGIN
    declare @Count int
    declare @ReturnCode int
    SELECT @Count = COUNT(Username)
    FROM tbl_Users WHERE Username = @C
    IF @Count > 0
    Begin
    Set @ReturnCode = -1
    End
    Else
    Begin
    Set @ReturnCode = 1
    INSERT INTO tbl_Users (FirstName, LastName, Username, Password, UserType) VALUES (@a,@b,@a,@b,@e)
    End
    SELECT @ReturnCode as ReturnValue
    END
    now users cant register anymore and when i tried to debug and find where the problem is, it completely skips the "if" section after 
    int ReturnCode = (int)sc.ExecuteScalar();
    im not sure whats goin on!! can anyone find out what the problem is?
    thank you in advance

    Can you try to replace the statement in the Stored Proc
    SELECT @ReturnCode as ReturnValue
    with
    RETURN @ReturnCode
    The SELECT statement returns the value as a dataset but the RETURN statement returns it as a Return Code for success/failure of the Stored Proc execution.
    Normally RETURN(0) i.e. a zero is returned as a default for success and a non-zero value is returned for a failure. But don't obther about the values at this time, just try the RETURN statement.
    - Aalam | (Blog)

  • Basic Stored Procedure Help - Not Returning Data

    Hello All:
    To be fair, I come from a SQL Server environment and have never written anything for PL/SQL / Oracle before, this is my first attempt, so if anything is better or more efficient, please let me know. The immediate problem I am having is, I have the Stored Procedure below, and all I want to do is return the data in the table, so that I can fill my DataSet in code. But when I run the code against this stored procedure, it always brings back no data (if I simply do a standard "SELECT * FROM lkAllocation", I get the results, so I know data is there and the connection is good). If run the procedure in my window in Oracle SQL Developer (call PAYSOL.spallocationselectall();), my results window shows no data as well. What is wrong with this Store Procedure?
    create or replace
    PROCEDURE spAllocationSelectAll IS
    AllocationID Integer;
    AllocationName Varchar2(50);
    BEGIN
    AllocationID := 0;
    AllocationName := '';
    SELECT
    AllocationID,
    AllocationName
    INTO
    AllocationID,
    AllocationName
    FROM
    lkAllocation
    ORDER BY
    AllocationName;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    NULL;
    WHEN OTHERS THEN
    -- Consider logging the error and then re-raise
    RAISE;
    END spAllocationSelectAll;

    Hi and welcome to the forum.
    But when I run the code against this stored procedure, it always brings back no data I presume that your code will fail when having more than one record in your table.
    Did you check your error logging table?
    Anyway:
    Your approach will not give you your desired results.
    You're selecting two column values in two variables and nothing else happens.
    No OUT-parameters declared
    Perhaps you're better off using a function instead of a procedure etc,etc...
    When you have more than one record on your table, you'll run into a TOO_MANY_ROWS error this way...
    See:
    PL/SQL 101 : Understanding Ref Cursors
    and
    Re: Dynamic sql or ref cursor or what
    or
    How to return table value from stored procedure without ref cursor
    In short: do a search on this forum on 'REF CURSOR'...
    Also try to read, learn, do searches and understand a bit about Oracle, by studying the docs.
    http://www.oracle.com/pls/db102/homepage
    Concepts: http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/toc.htm
    Fundamentals: http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/toc.htm
    And check out http://asktom.oracle.com as well...

  • Report with Stored Procedure does not return until refresh

    I'm using RAS server 2008 to run many Crystal reports from a web application (TrackWise) over Oracle 10g DB.
    A new report is using a stored procedure that takes several minutes (5-10) to return before the rest of the report's SQL can execute.
    When running the report from Crystal Developer there is no problem,
    but when running from the application (using the RAS), the report seems to be running forever,
    However, if you wait a few minutes for the DB utilization to drop (i.e. for the stored procedure to finish) and refresh - the full report appears on the screen in a second.
    Since I have many other reports that run for much longer time with no issue, I assume that this has nothing to do with the web application, but rather related to the connection between the RAS and the DB (i.e. the idle time between the beginning of the stored procedure execution to its return and the continuation of the report creation).
    I assume that I need to change one of the RAS settings/ parameters (in the properties or in the registry), but which?
    Please assist.

    Since this app is from TrackWise, I'd recommend contacting TrackWise and see if they have an answer for you. As it is, we have no idea how they implemented the CR components in their app. If they cannot help you, it should be them coming here and asking us - or better yet they should be creating a phone incident.
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Stored procedure could not be found.

    I'm upgrading my forms 6i to 11g on Windows.
    There is a procedure called center_window('WIN_MAIN',TRUE); in the pre-form trigger.
    There is no compiling error, but when the web page opens, it says "PRE-FORM trigger raised unhandled exception ORA-06508";
    I searched ORA-06508, it's described like "ORA-06508: PL/SQL: could not find program unit being called".
    procedure is located at a library called PLL_WINDOW, I have attached it to the form.
    So why it cannot find it ? Thanks
    [Code Image|http://alturl.com/py5ad]

    Have you recompiled the library in Forms 11g?
    Is the library in the runtime FORMS_PATH ?
    Tony

  • The link to a user defined oracle stored procedure does not work

    This is based on the HowTo Download a file
    http://otn.oracle.com/products/database/htmldb/howtos/howto_file_upload.html
    I have given a link to a procedure as follows, which will download the file (as given in the HowTo):
    #OWNER#.download_my_file?p_file=#ID#.
    However, this does not work. It tries to open a page rather than executing the procedure. It displays the page not found message

    that page not found message is a generic one. you'd want to check your apache logs for more info on what really happened. my guess is that you missed step 5 of that how-to, "grant execute on download_my_file to public"
    hope this helps,
    raj

  • 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

  • DDL statement/s in stored procedures (FUNCTION)

    Hello all,
    I was trying to create a small function that tests keywords on the basis of successful/failed table creation. If a table can be created with a keyword as identifier, it is a non-reserved keyword, if table creation fails, it is a reserved keyword:
    CREATE OR REPLACE FUNCTION createTableForKeyword (keyword VARCHAR) RETURN BOOLEAN IS
    BEGIN
    CREATE TABLE keyword (x NUMBER);
    -- if no exception occurred, table creation succeeded
    DROP TABLE keyword; drop it
    RETURN FALSE; -- FALSE means non-reserved
    EXCEPTION
    WHEN OTHERS THEN
    -- if exception occurred, table creation failed
    RETURN TRUE; -- TRUE means reserved
    END createTableForKeyword;
    This would have been my first PL/SQL program, but I get the following error:
    PLS-00103: Found symbol "CREATE" when expecting one of:
    begin case declare exit ................
    .............. merge pipe
    I had to translate the error message from German, but it should suffice. Obviously DDL statements in functions are not allowed. How do I solve my problem then, given a table that has one column containing the keyword?:
    CREATE TABLE Keywords (keyword VARCHAR(30));
    I was looking too call this function from a loop, but how would I do this without a function? How do I capture table creation fails without exceptions in functions?
    TIA
    Karsten

    To run DDL inside stored procedure you must use Dynamic SQL. Use EXECUTE IMMEDIATE
    To see if a word is a reserved word just query V$RESERVED_WORDS
    Thanks,
    Karthick.

  • Could not find stored procedure

    Dear gurus,
    I am working, for the first time, on a SAP BPC ( MS ) demo.
    I have created a new input schedule based on a dynamic template, with some modifications.
    However when I try to submit data, it gives an error:
    "Could not find stored procedure 'dbo.up_ConcurrentLockDEL_HR'.;"
    DEL_HR is my application and is based on a existing one "FINANCE", but I have added new dimensions and deleted another ones.
    I can not understand this message because I don't know where I define stored procedures. I also commented all script logics that this application had.
    Could you help me on this?
    Best regards,
    Vitor Ramalho

    Hi Vitor,
    You need to login to the server, where SQL has been installed. You can login to that system using remote desktop connection.
    Once you login to the SQL server, under the databases, you will find your application set. Expand it and navigate to Programmability and then to Stored Procedures. Here, you will get all the stored procedures.
    The above statements will guide you to find the stored procedures. However, the problem, we are looking at is little different. Usually, with every application, a stored procedure with the name, "dbo.up_ConcurrentLockappname" gets created automatically. However, I am guessing that this stored procedure is not available for your application. Search for the stored procedure just to make sure that its available or not. If its not available, search for dbo.up_ConcurrentLockFinance. I am asking to search for the Finance one since your application is copy of the Finance application. So, just to make sure that the source application is fine. If this stored procedure is present but the stored procedure for your application is not present, then I would suggest you to create the application once again. Process it properly.
    Hope this helps.

  • JDBC stored procedure not working in Weblogic 12.1.3

    Hi,
    We are migrating from WLS 12.1.2 to 12.1.3.
    We have a JDBC stored procedure which used to work correctly under 12.1.2. I understand that 12.1.2 uses ojdbc5/ojdbc6 jars (11.2.0.x). After migrating to 12.1.3, the stored procedure is not working.
    We have narrowed it down to the different between 12.1.2 using ojdbc5/6 and 12.1.3 using ojdbc7 jars, though we do not understand what the difference here is.
    Connection connection = getConnection();
    CallableStatement callableStatement = connection.prepareCall("{call RECEIPT_LOG (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}");
    callableStatement.registerOutParameter("PIO_RECEIPT_LOG_ID", java.sql.Types.INTEGER);
    callableStatement.setLong("PIO_RECEIPT_LOG_ID", 0);
    callableStatement.setString("PIO_DRAWER_NAME", request.getDrawerName());
    callableStatement.setString("PIO_DRAWER_FIRST_NAME", request.getDrawerFirstName());
    callableStatement.setString("PIO_DRAWER_OTHER_NAMES", "");
    callableStatement.setString("PIO_DRAWER_STREET_NO", "");
    callableStatement.setString("PIO_DRAWER_STREET", "");
    callableStatement.setString("PIO_DRAWER_LOCALITY", "");
    callableStatement.setLong("PIO_DRAWER_POSTCODE", 0);
    callableStatement.setString("PI_PAYMENT_TYPE", request.getPiPaymentType());
    callableStatement.setLong("PI_APPLICATION_ID", request.getApplicationId());
    callableStatement.setString("PI_PRIMARY_ID", request.getPiPrimaryId());
    callableStatement.setString("PI_SECONDARY_ID", request.getPiSecondaryId());
    callableStatement.setDouble("PI_AMOUNT", request.getPiAmount());
    callableStatement.setInt("PI_TAX_AMOUNT", 0);
    callableStatement.setNull("PI_VPC_TXNRESPONSECODE", java.sql.Types.VARCHAR);
    callableStatement.setInt("PI_VPC_TRANSACTIONNO", 0);
    callableStatement.setString("PI_VPC_MESSAGE", "");
    callableStatement.setString("PI_VPC_ACQRESPONSECODE", "");
    callableStatement.setString("PI_VPC_RECEIPTNO", "");
    callableStatement.setString("PI_VPC_BATCHNO", "");
    callableStatement.setString("PI_VPC_CARD", "");
    callableStatement.setString("PI_VPC_MERCHTXNREF", "");
    callableStatement.setString("PI_VPC_MERCHANT", "");
    callableStatement.setString("PI_VPC_ORDERINFO", "");
    callableStatement.setInt("PI_VPC_AMOUNT", 0);
    callableStatement.setString("PI_VPC_AUTHORIZEID", "");
    callableStatement.registerOutParameter("PO_RECEIPT_NO", java.sql.Types.VARCHAR);
    callableStatement.registerOutParameter("PO_SOURCE_ID", java.sql.Types.INTEGER);
    callableStatement.registerOutParameter("PO_PAYMENT_METHOD_TEXT", java.sql.Types.VARCHAR);
    callableStatement.registerOutParameter("PO_CREATE_COMMENT", java.sql.Types.VARCHAR);
    callableStatement.registerOutParameter("PO_ERROR_MESSAGE", java.sql.Types.VARCHAR);
    boolean isSuccessful = callableStatement.execute();
    Long receiptLogId = callableStatement.getLong("PIO_RECEIPT_LOG_ID");
    Here, when the callableStatement.execute() is fired, the isSuccessful is false and the output parameter receiptLogId is 0
    Any help appreciated.
    Regards,
    Rahul

    Hi All,
    We still haven't figured out what the problem is with JDBC when using ojdbc7.jar but, as an alternate solution we ported the code to Spring JDBC and got it working.
    Regards,
    Rahul

  • SSRS Suddenly Not Running Stored Procedures

    My problem is affecting multiple reports. They have all been working until recently. Suddenly any parameter that is fed via a stored procedure is not working. Parameters fed via direct query work just fine. I'm lost as to what the cause could be.

    Have the DBA monitor with SQL Profiler:  
    SQL Server Profiler
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

Maybe you are looking for

  • Error at Receiver Mail adapter modules

    Hi, We have implemented a receiver mail adapter for producing Excel file as attachment. It is giving the error as follows: Delivery of the message to the application using connection Mail_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.

  • FS00 Matchcode selection with " * "

    Hello Guys, I'm working on ECC6 and I am facing the following issue: I launch the FS00 transaction, I want to display all the GL account starting with 4 so I type 4* in the matchcode, I press enter.... nothing happens ! It would normally display the

  • Basic FI queries

    Hi Friends I have some queries, can some body help to explain this: 1. Do Fi persons work on Credit control area , if yes whats the use of credit control area, and where we do the all detail config for this one. 2. how to see the financial statements

  • Simple AS3 external swf playing code?

    Hi I'm after some REALLY simple code, and am happy to pay someone via Paypal to do this for me. I want to have a one frame piece of AS3 code that loads in external swfs from an array. I want external swf 1 to play, and when it's finished, swf 1 unloa

  • Airport Extreme won't work with windows computer?

    I can't get airport extreme to work with my other computer which is a windows machine. The windows machine can't find the network address. Sometime it does find an address and appears to be connected, however I cannot connect to the internet with tha