HANA Procedure with parameter in create part

Hi!
I have a problem with creating a HANA procedure. My procedure looks like this:
CREATE PROCEDURE myProcedure
( IN ToDate TIMESTAMP)
LANGUAGE SQLSCRIPT AS
d1 TIMESTAMP;
BEGIN
d1:= :ToDate;
CREATE LOCAL TEMPORARY TABLE #Avst AS
( SELECT *
FROM ITR1 A1
    INNER JOIN OITR A ON A."ReconNum"= A1."ReconNum"
WHERE A."ReconDate"<= :d1
SELECT * from #Avst;
DROP TABLE #Avst;
END
The communicate I get is:
SAP DBTech JDBC: [467]: cannot use parameter variable: D1: line 4294967295 col 4294967295 (at pos 4294967295)
Can someone help me with that?
Thanks
Jadia

Hi Krishna!
Thank you for reply. However, the code does not work, unfortunately. I have a message:
Could not execute 'CREATE PROCEDURE myProcedure ( IN ToDate TIMESTAMP) LANGUAGE SQLSCRIPT AS d1 TIMESTAMP; BEGIN ...' in 1 ms 697 µs .
SAP DBTech JDBC: [257] (at 214): sql syntax error: incorrect syntax near "Insert into #Avst (SELECT * 
FROM ITR1 A1  
    INNER JOIN OITR A ON A."ReconNum"= A1."ReconNum" 
WHERE A."ReconDate"<= :d1)": line 9 col 11 (at pos 214)

Similar Messages

  • Procedure with OUT Parameters - Creating A Report

    I have the following procedure that is used in our internal (non-APEX) apps:
    PROCEDURE SelIssueActivityPublic (
                                                p_results           OUT     SYS_REFCURSOR,
                                                p_IssueID                    IN     ems.issue.issue_id%TYPE,
                                                p_TransactionID         OUT VARCHAR2
                 ) The body of the procedure does a bunch of processing, and inserts data into a staging table. The cursor OUT parameter then returns a SELECT statement from the staging table. Since it's possible for this procedure to be hit multiple times (multiple users), the transaction ID is used to match the data in the staging table to the correct request. The procedure then deletes the data from the staging table. (I'll post it if necessary, but it's quite long, and since it's used in other applications successfully, I don't believe it's relevant to my issue.)
    I have been asked to create an APEX report of the data generated by the procedure. I've never used a procedure with an OUT parameter to set up a report. I was hoping to assign the transaction ID to a hidden variable on page load, and then using it to poplulate the report. I'm not interested in the cursor OUT parameter, I've written my own SELECT statement to grab data from the staging table.
    I tried to create a page computation that did this - item :H_P19_TRANSID, Before Header, computation = EMS.EMS_READER.SelIssueActivityPublic(:H_P19_CURSOR, 454551, :H_P19_TRANSID) [454551 is a test issue id], but I get the following error: ORA-06550: line 1, column 43: PLS-00222: no function with name 'SELISSUEACTIVITYPUBLIC' exists in this scope ORA-06550: line 1, column 7: PL/SQL: Statement ignored flowComp=H_P19_TRANSID
    Error ERR-1030 Error executing computation expression. It seems to be thinking that SelIssueActivityPublic is a function, and I'm not sure why.
    Basically I need to know how to use this existing procedure to set up my report. Once I can get the transaction ID into a page item, I'll be set.

    I never got a chance to finish this report, as I was shuffled to something else with a higher priority. Now that I'm coming back to it, I still have a few issues.
    I created a new function that does all the processing (inserting into the staging table etc.), and returns the transaction id. I then tried to set up a page computation on a hidden item to run this function and store the transaction id.
    In the computation, if I put
    reader.SelIssueActivityPubnocursor(:H_P19_ISSUEID); as the computation, I get ORA-06503: PL/SQL: Function returned without value flowComp=H_P19_TRANSACTIONID as an error. If I put return return reader.SelIssueActivityPubnocursor(:H_P19_ISSUEID); as the computation, I get ORA-06550: line 1, column 50: PLS-00103: Encountered the symbol "EMS" when expecting one of the following: . ( * @ % & = - + ; < / > at in is mod remainder not rem <> or != or ~= >= <= <> and or like like2 like4 likec between || multiset member submultiset The symbol "." was substituted for "EMS" to continue. flowComp=H_P19_TRANSACTIONID as the error. Can someone tell me what's going wrong?

  • Problem calling Procedure with parameter from Dynamic Page

    I received an error saying the Page not found
    here's how to reproduce the error.
    1. Create procedure in portal30 schema.
    Create or Replace PROCEDURE PORTAL30.ADD_TWO_VALUES
    v_one IN NUMBER,
    v_two IN NUMBER,
    v_result OUT NUMBER)
    as
    begin
    v_result :=v_one+v_two;
    end;
    2. Create Dynamic Page with following code
    <ORACLE>DECLARE
    v_total NUMBER;
    BEGIN
    ADD_TWO_VALUES(:v_one,:v_two, v_total);
    htp.p('The total is => ');
    htp.p('<input type="TEXT" VALUE='||v_total||'>');
    htp.para;
    htp.anchor('http://<machine.domain:port#>/pls/portal30/PORTAL30.DYN_
    ADD_TWO_VALUES.show_parms', 'Re-Execute Procedure');
    END;</ORACLE>
    3. I clicked on Customize Link and entered 2 numbers as values for v_one and v_two.
    4. Got "The page cannot be found" error in I.E. or "The requested URL /pls/portal30/PORTAL30.DYN_SAMPLE_ADD.show was not found on this server." on Netscape
    However when I subsitute "ADD_TWO_VALUES(:v_one,:v_two, v_total);" in the dynamic page for "ADD_TWO_VALUES(3,2, v_total);", it runs just fine.
    What's wrong here? Can I not use a parameter from a dynamic page and call a procedure with it? Help is needed urgently and will be greatly appreciated.
    -Ahsun

    Hi,
    I tried with your code with few changes ,please try with them.
    Create or Replace PROCEDURE <myschema>.ADD_TWO_VALUES
    v_one IN NUMBER,
    v_two IN NUMBER,
    v_result OUT NUMBER)
    as
    begin
    v_result :=v_one+v_two;
    end;
    I created the procedure in <mySchema> and granted that to <application_schema> and made some changes
    <ORACLE>
    DECLARE
    v_total NUMBER;
    BEGIN
    <procedure_schema>.ADD_TWO_VALUES(:v_one,:v_two, v_total);
    htp.p('The total is => ');
    htp.p('<input type="TEXT" VALUE='||v_total||'>');
    htp.para;
    htp.anchor('http://<your_host>/pls/<portal_schema>/<application_schema>.DYN_FOR_OTN.SHOW_PARMS', 'Re-Execute Procedure');
    END;
    </ORACLE>
    Hope this helps.
    rahul

  • How to call sql procedure with parameter from java

    Hello,
    i am trying to call one sql procedure with two parameters from java.
    the first parameter is In parameter, the second is OUT.
    the return value of this java method should be this second parameter value.
    the following is my java code:
    protected String getNextRunNumber() {
         String runnumber=null;
         String sql = "{call APIX.FNC_SST_EXPORT.GET_NEXT_RUNNUMBER (?,?)}";
    CallableStatement state = null;
    try{
         Connection con= getDatabaseConnection();
         state = con.prepareCall(sql);
         state.setString(1, m_appKeyExport);
         state.registerOutParameter(2,Types.NUMERIC,0);
         state.execute();
    ResultSet resultR = (ResultSet)state.getObject(2);
         while (resultR.next()) {
              runnumber=resultR.getBigDecimal(1).toString();
    catch (SQLException e){System.out.println("You can not get the export next run number properly");}
    return runnumber;
    i got error message like:
    java.lang.ClassCastException: java.math.BigDecimal
    As far as i knew, if the parameter is number or decimal, we should give also the paramer scale to the method: state.registerOutParameter(), but i still get this error message.
    Please help me to solve this problem.
    Thanks a lot.

    state.execute();
    i try to use debug to find the problem, in this line, i saw
    OracleCallableStatement(OraclePreparedStatement).execute() line: 642 [local variables unavailable]
    is this the problem?

  • Help in calling stored procedure with parameter in JSP

    I need to know how to call this stored procedure in JSP
    here is my Stored procedure in oracle 9i:
    CREATE OR REPLACE procedure broker_activity
    (p_broker_id IN number,p_TotalValue out number,p_CrossValue out number, p_blockValue out number, p_MktWeight out number,p_BuyingVal out number, p_sellingVal out number, p_NetValue out number)
    AS
    begin
    declare
    -- buying value
    cursor c_BuyingVal is select buyer_firm, sum(volume*price) value from last_sale where buyer_firm = p_broker_id group by buyer_firm;
    -- selling value
    cursor c_SellingVal is select seller_firm,sum(volume*price) value from last_sale where seller_firm = p_broker_id group by seller_firm;
    v_BuyingCurVal c_buyingVal%rowtype;
    v_SellingCurVal c_sellingVal%rowtype;
    n_buy_val number :=0;
    n_sell_val number :=0;
    n_total_value number := 0;
    begin
    --buying value
    open c_BuyingVal;
    fetch c_BuyingVal into v_buyingCurVal;
    n_buy_val := nvl(n_buy_val,0) + v_buyingCurVal.value;
    --Exit when c_BuyingVal%NOTFOUND;
    close c_buyingVal;
    p_BuyingVal := n_buy_val;
    --selling value
    open c_SellingVal;
    fetch c_SellingVal into v_SellingCurVal;
    n_sell_val := nvl(n_sell_val,0) + v_SellingCurVal.value;
    -- Exit when c_BuyingFirm%NOTFOUND;
    close c_SellingVal;
    p_SellingVal := n_sell_val;
    --total value
    p_TotalValue := n_buy_val + n_sell_val;
    --cross val
    select sum(volume*price) into p_CrossValue from last_sale where board = 'C' and (buyer_firm = p_broker_id or seller_firm = p_broker_id);
    --block Sale
    select sum(volume*price) into p_BlockValue from last_sale where board = 'B' and (buyer_firm = p_broker_id or seller_firm = p_broker_id);
    --Net Value
    p_NetValue := n_buy_val - n_sell_val;
    --markte_weight
    select (sum(volume*price) * 2)/100 into p_MktWeight from last_sale ;
    end;
    end;

    http://developer.java.sun.com/developer/onlineTraining/Database/JDBC20Intro/JDBC20.html

  • 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]

  • Help on report base on stored Procedure with parameter in Oracle

    In Deski was able to get BO report from Stored Procedure if no parameters is required. When I tried to add a parameter to the Stored procedure does not return anything.   Your assistance is greatly appreciated.
    Here  is what I used perform the task.
    create or replace package Test_Package as
      -- Public type declarations
    TYPE Test_Type IS REF CURSOR RETURN Test_Table%ROWTYPE;
    end Test_Package;
    CREATE OR REPLACE PROCEDURE Test_Procedure(
                                test_cursor IN OUT test_package.Test_Type,
                                Test_Parameter in c2c.Test_Table.Id%type) IS
           BEGIN
                                open test_cursor for
                                select *
                                from c2c.Test_Table
                                where Test_Table.Id = Test_Parameter;
           END Test_Procedure;
    create table TEST_TABLE
      ID        NUMBER(5),
      FIRSTNAME VARCHAR2(30),
      LASTNAME  VARCHAR2(30)
    insert into Test_Table values(1,'Chen', 'Low');
    insert into Test_Table values(2,'Leonard', 'Johnson');
    insert into Test_Table values(3,'David ', 'Sucuk');
    insert into Test_Table values(4,'Marc', 'Paul');
    insert into Test_Table values(5,'Mark', 'Blasko');

    http://developer.java.sun.com/developer/onlineTraining/Database/JDBC20Intro/JDBC20.html

  • Using PLSQL procedure with parameter in AQ

    hi,
    we need to run a PLSQL procedure(asynchronously) with in parameters using oracle AQ.
    can someone give me simple example/hint?
    Many thanks

    Since you mention dbms_job, can you use dbms_scheduler since you can pass in parms? You can schedule the job to run "now" and while it may have a slight delay starting up due to available processes for the scheduler and system load, it will run as soon as it can.
    What are you trying to accomplish in your environment? I'm not following why you want to allow a user to schedule any DB procedure. A certain set yes, all, no.
    You could create a generic AQ structure where it is passed some information regarding what procedure needs to run and what/where the parms are. This driver procedure would then be responsible for calling a random procedure via dynamic SQL. I've never tried passing parms to a procedure via dynamic SQL but recall reading you could do it. I wouldn't recommend this approach unless you have no better options though.

  • Calling a Stored Procedure with Parameter using an UDF

    Hi All,
      I have a requirement where I need to use database lookup. In that I am calling the Stored Procedure using UDF. For example sp_flow ., for this I have to pass<INTID> and <USDERID> to get the response.
    I am using the below code to excute this.
    Channel channel = null;                                                   
    Map rowMap = null;                                                        
    DataBaseAccessor accessor = null;                                         
    DataBaseResult resultSet = null;                                          
    String Query = null;   
    //Query ="EXECUTE dbo.sp_flow <INTID> <USERID>;                                                 
    Query = "EXECUTE dbo.sp_flow  \'304\' ,  \'shankar\'  " ;       
      try{                                                                               
    //Determine a channel, as created in the Configuration                    
    channel =                                                                 
    LookupService.getChanne"BS_XXX","CC_XXX_JDBC_Rcv");                                                                               
    //Get a system accessor for the channel. As the call is being made to an  
    DB, an DatabaseAccessor is obtained.                                      
    accessor = LookupService.getDataBaseAccessor(channel);                                                                               
    //Execute Query and get the values in resultset                           
    resultSet = accessor.execute(Query);                                                                               
    for(Iterator rows = resultSet.getRows();rows.hasNext();){                 
    rowMap = (Map)rows.next();                                                                               
    result.addValue((String)rowMap.get("FLOW_ID"));                       
    I am getting the error "Error when calling an adapter by using the communication channel CC_NWLS_TLA_JDBC_Rcv (Party: , Service: BS_MICROSOFT_SQLWLS20DEV_D, Object ID: d30aace599de3cd69548bf145d0724b7) XI AF API call failed. Module exception: (No information available). Cause Exception: 'Error processing request in sax parser: Error when executing statement for table/stored proc. 'table' (structure 'statement'): com.microsoft.sqlserver.jdbc.SQLServerException: The statement did not return a result set."
    let me know how do this.
    Regards
    shankar
    Edited by: Shankar on Jun 9, 2009 2:51 PM
    Edited by: Shankar on Jun 9, 2009 3:02 PM

    first of all calling a SP via the lookup API, there is a workaround but it is not at all recommended
    FYI
    /people/arpil.gupta/blog/2008/11/03/workaround-for-jdbc-scenarios - DB Lookup via Stored procedure
    http://help.sap.com/javadocs/NW04S/current/pi/com/sap/aii/mapping/lookup/DataBaseAccessor.html
    The accessor does not support transactional behaviour. Therefore, the method should not be used to execute insert or update statements on the database which can lead to inconsistencies. The accessor should only be used to read data from a database table.

  • Cannot create view with parameter bindings

    Hi, I'm trying to create this view in SQLPlus:
    SELECT order_no, SUM(cut_qty),
    SUM(received_qty)
    FROM (
    SELECT order_no, cut.dated, DECODE(cut.bimetallic, 'F', cut.quantity, cut.quantity/2) cut_qty,0 AS received_qty
    FROM cut_shop_orders_dated cut
    WHERE cut.dated BETWEEN TO_DATE('&date1','DD/MM/YYYY') AND TO_DATE('&date2','DD/MM/YYYY')
    UNION
    (SELECT order_no, rec.dated, 0, rec.quantity
    FROM received_shop_orders_dated rec
    WHERE rec.dated BETWEEN TO_DATE('&date3','DD/MM/YYYY') AND TO_DATE('&date4','DD/MM/YYYY')))
    GROUP BY order_no
    The problem is that sqlplus asks me for the parameter values and then creates it with these values as literal dates in the to_date function, those not asking for parameter values in runtime.
    How can I create it using parameters with no values at design time?
    Thanks.
    Leandro.

    if you want something like :
    select * from emp $where_clause;
    you can write a procedure with parameter and run it as dynamic sql for example
    create or replace procedure pr1 ( p_where   varchar2) is
    begin
      execute immediate 'create or replace view view_name as select * from emp '|| p_where;
    end pr1;
    /then run it on sql*plus
    SQL> exec pr1('where deptno = 10');
    make sure you give yourself "create any view" rights explicitly.
    HTH
    Ghulam

  • Call stored procedure(with parameters) via odbc

    In my application I like to use the below statement to call a stored procedure with parameter and return a result set.
    {CALL PP.getPerson('daniel')}
    but this will just return errors to my application.
    If I change the statement to:
    {CALL PP.getPerson(?')}
    and bind a parameter and its value, it will work.
    My question is, is it possible to call a stored procedure via ODBC without binding parameters in application? I mean, what will be my SQL equivalent if I don't want to do parameter binding in my application?
    Thanks in advance. I appreciate any help :-)

    hi 
    Please see the e.g bellow
    create proc proc_test(@SchoolNumber int,@SchoolName
    varchar(100),@StudentNumber int, @StudnentName
    varchar(100)output ,
    @StudentAddress varchar(100) output,
    @Studentbirthdate datetime output,
    @StudentPhoneNumber varchar(100) output,
    @GuardianName varchar(100) output)
    as
    begin
    select @StudnentName varchar=StudnentName ,
    @StudentAddress =StudentAddress,
    @Studentbirthdate =Studentbirthdate ,
    @StudentPhoneNumber =StudentPhoneNumber,
    @GuardianName =GuardianName
    from table where schoolno=@SchoolNumber
    and SchoolName=@SchoolName
    and StudentNumber=@StudentNumber
    return
    end
    http://technet.microsoft.com/en-us/library/ms187004(v=sql.105).aspx
    http://www.lynda.com/SQL-Server-tutorials/Using-input-output-parameters/104964/113058-4.html
    Please mark answered if I've answered your question and vote for it as helpful to help other user's find a solution quicker

  • How to run procedure(with paramater other than errbuff and retcode) through

    Hi everybody,
    This is Ram. I'm comfortable while running a procedure through concurrent program. but getting error when trying to run a procedure with parameter. Plz let me know the process (if possible example) of running a pl/sql procedure(with parameter) through concurrent programs..
    Regards,
    Ram.

    Hi
    It's difficult to know exactly what to modify to have no errors as those are not specified. However, the rule of thumb is for a procedure to be used as a concurrent program:
    procedure conc_prog(
    errbuf out varchar2
    , retcode out varchar2
    , param1 in varchar2 -- all additional parameters must by of IN type
    , paramn in varhcar2 ) ;
    On the concurrent program definition form, add the parameters from the third one, errbuf and retcode don't neet to be defined. Be careful on datatypes as date an numbers may have format mask problems when passed to your procedure and more possibility for this to happen is more than one language is installed. A safe way to pass those values would be to define parameters as varhchar2 and in your code, define a variable of the right type to use and assign the received value with the format mask defined for the value set associated to the parameter.

  • I have created stored procedure with %rowtype as IN OUT parameter.I want to

    i have created stored procedure with %rowtype as IN OUT parameter.I want to call it in java program

    Hi Avi,
    I have the same problem as the person asking before me, so I'll try and clarify:
    I have a Java client and a PL/SQL database procedure that looks something along the lines of:
    Create of Replace procedure myProc(myRow IN myTable%Rowtype)
    It's very easy to pass a parameter into this procedure from another procedure within the database because creating another myTable%Rowtype is not a problem.
    However, Java doesnt know what "Rowtype" is.
    I was wondering how I would pass a "rowtype" from Java.
    I was thinking along the lines of creating an object in the DB like that:
    Create Type myObj AS myTable%Rowtype (<-- is that even allowed?)
    And then create a procedure in the DB with the header:
    Create of Replace procedure myProc(myRow IN myObj)
    And then, in my Java,just create a STRUCT of my DB object and pass it to the DB:
    myCallableStatement.setObject(1, myStruct);
    Would that work?
    Is there a better way?
    Thanks,
    Dan

  • Calling a stored procedure with a CLOB as input parameter

    Hello,
    I was unsuccessfully trying to call a stored procedure with a clob as input parameter from my C++ application using occi.
    Anyone got a working example to look at?
    I already checked the thread Invalid OCI handle when creating a Blob which didn't help.
    The problem seems to be that I don't have a lob locator to write my data (xml file) to. I tried creating a temporary clob using the sys.dbms_lob package which only resulted in a major headache on my part...
    I would appreciate any help.
    Kind regards
    Horst
    my environment:
    Visual Studio 2008, C++ application
    Oracle 11g

    To start using a blob you have to insert it into the database and then get it back. Sounds weird but that is how it is. Here is a very simple program to do this:
    #include<occi.h>
    #include <iostream>
    using namespace oracle::occi;
    using namespace std;
    int main()
      try
        Environment *env = Environment::createEnvironment(Environment::OBJECT);
        Connection *conn = env->createConnection("hr","hr","");
        string stmt1 = "insert into blob_tab values (:1) ";
        string stmt2 = "select col1 from blob_tab";
        Blob blob(conn);
        blob.setEmpty(conn);
        Statement *stmtObj = conn->createStatement(stmt1);
        stmtObj->setBlob(1,blob);
        stmtObj->executeUpdate();
        conn->commit();
        Blob blob1(conn);
        Statement *stmtObj2 = conn->createStatement(stmt2);
        ResultSet *rs = stmtObj2->executeQuery();
        while(rs->next())
         blob1 = rs->getBlob(1);
        string stmt3 = "begin my_proc(:1) ;end;";
        Statement *stmtObj3 =  conn->createStatement(stmt3);
        stmtObj3->setBlob(1,blob1);
        stmtObj3->executeUpdate();
      catch (SQLException e)
        cout << e.getMessage();
      /* The tables and procedure are primitive but ok for demo
        create table blob_tab(col1 blob);
        create or replace procedure my_proc(arg in blob)
        as
        begin
         -- just a putline here. you can do other more meaningful operations with the blob here
          dbms_output.put_line('hello');
       end;
    }Hope this helps.
    Thanks,
    Sumit

  • 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

Maybe you are looking for

  • Compiling Apache 1.3.9 & PHP 3.0.12 to use Oracle 8.1.5 on SuSe 6.2

    Hi! I am trying to compile the above packets but am running into massive problems. PHP3 compiles well, if i try to use the "normal" static module for Apache, but the Apache configure script says that it needs an ANSI C compiler and stops. I am using

  • My Apple ID is not being accepted on my Mac

    My Apple ID is not being accepted on my Mac but is okay on both my other Apple devices.

  • So you want to design a book without pages?

    Don't even try it my friend. At the end of the book production process, when you connect to iTunes Producer, you will encounter a file parsing program, just call him EPUB Robot, or E-Bot, if you like. E-Bot wants to see books with pages and more than

  • Problem Displaying Unicode at the console

    Hello, What do I need to do to print out a unicode charecter which is of some other language for example ( telugu,an indian language). I had found out that the unicode range for telugu is 0C00 to 0C7F. I had tried doing char c = '\u0C10';           S

  • Number of photos in file

    Seems like previous versions of LR (2. and lower) would display the total numer of photos in the the entire file structure beneath the file highlighted.  LR 3.0 and up appears to only display the number of photos in the highest level of the file stru