Oracle stored proc problem

HI, I have created a stored proc in oracle similar below:
CREATE OR REPLACE PACKAGE PACK_REFCURSOR_NHM_TRANSACTION AS
TYPE TRANS_TableRows IS REF CURSOR
RETURN NHM_TRANSACTION%ROWTYPE;
PROCEDURE REFCUR_NHM_TRANSACTION (
IN_sTMPACC IN string,
IN_sITEM_TYPES IN string,
OUT_TRANS OUT TRANS_TableRows);
END PACK_REFCURSOR_NHM_TRANSACTION ;
-- the above works fine
--but this one below has the error when
CREATE OR REPLACE PACKAGE BODY PACK_REFCURSOR_NHM_TRANSACTION
AS
PROCEDURE REFCUR_NHM_TRANSACTION (
IN_sTMPACC IN string,
IN_sITEM_TYPES IN string,
OUT_TRANS OUT TRANS_TableRows) IS
BEGIN
OPEN OUT_TRANS FOR
SELECT T.TRANSACTION_ID, T.TRANSACTION_TYPE,
T.TRANSACTION_DATE, T.TRANSACTION_TIME,
T.ITEM_CODE, 0 OE_DETAIL_ID,
T.QUANTITY, T.LIST_PRICE, T.DISCOUNT, T.SALE_PRICE,
T.GST_AMOUNT, 'I'INSURER_TYPE
FROM NHM_TRANSACTION T
WHERE DISPENSED_FLG = 'Y'
AND T.ACCOUNT_ID = IN_sTMPACC
AND T.TRANSACTION_TYPE IN ('01','02', '09')
AND NVL(T.STATUS,'F') != 'C'
AND T.BILLED_FLG = 'N'
AND T.ITEM_TYPE IN (IN_sITEM_TYPES)
AND T.BILL_ITEM_FLG = 'Y'
UNION ALL
SELECT T.OE_TRANSACTION_ID TRANSACTION_ID, TRANSACTION_TYPE,
T.TRANSACTION_DATE,
T.TRANSACTION_TIME, NVL(T.ITEM_CODE,T.PACKAGE_CODE)
ITEM_CODE, T.OE_DETAIL_ID,
T.QUANTITY, T.LIST_PRICE, T.DISCOUNT, T.SALE_PRICE,
T.GST_AMOUNT, 'S' INSURER_TYPE
FROM NHC_OE_TRANSACTION T, NHC_MASTER_ITEM M, NHM_PACKAGE P
WHERE T.ACCOUNT_ID = IN_sTMPACC
AND T.ITEM_CODE = M.ITEM_CODE(+)
AND T.PACKAGE_CODE = P.PACKAGE_CODE(+)
AND (DECODE(T.ITEM_CODE,NULL,P.BILL_OPTION,M.BILL_OPTION) in
('P','O','F'))
AND NVL(T.STATUS,'F') != 'C'
AND T.BILLED_FLG = 'N'
AND ((T.TRANSACTION_TYPE = '09' AND STATUS IN ('P','R'))
OR T.TRANSACTION_TYPE IN ('01','02','11','12', '10'))
AND T.BILL_ITEM_FLG = 'Y'
AND T.ITEM_TYPE IN (IN_sITEM_TYPES) ;
END REFCUR_NHM_TRANSACTION ;
END PACK_REFCURSOR_NHM_TRANSACTION ;
--this gives error: PLS-00382: expression is of wrong type
but when i tried to change the query similar to this:
OPEN OUT_TRANS FOR
SELECT T.*
FROM NHM_TRANSACTION T
WHERE DISPENSED_FLG = 'Y'
AND T.ACCOUNT_ID = IN_sTMPACC
AND T.TRANSACTION_TYPE IN ('01','02', '09')
AND NVL(T.STATUS,'F') != 'C'
AND T.BILLED_FLG = 'N'
AND T.ITEM_TYPE IN (IN_sITEM_TYPES)
AND T.BILL_ITEM_FLG = 'Y' ;
--that worked fine. what i found out is the proc doesn't seem
to work with complicated queries. instead it works only in
something similar to SELECT T.*? and not when individual fields are
extracted? I can't understand why? can anyone help me with this>
thanks.

I think what is hapenning is that you are declaring the
reference cursor in your package spec as a "strong" type as a
rowtype of table NHM_TRANSACTION. However, in your OPEN FOR SELECT
statement, you are selecting columns that do not exist in the the
NHM_TRANSACTION table, such as 0 OE_DETAIL_ID, 'I'INSURER_TYPE,
etc.
You would be much better off to declare your reference cursor
as a "weak" type so that your OPEN FOR SELECT statement actually
defines the return structure:
TYPE TRANS_TableRows
IS REF CURSOR;
In other words, leave off the RETURN NHM_TRANSACTION%ROWTYPE
in your ref cursor declaration, and you would probably be OK
(assuming, of course, that all of the columns selected in your
UNION statements are like data types).
Phil

Similar Messages

  • Error while debugging the Oracle Stored Proc Body

    I am trying to debug a standalone Oracle Stored Proc. I keep a break point on the Package body, and JDeveloper doesn't seem to pick it up at all. I have made sure that are the prerequisites are met and all the instructions have been followed diligently, but still i keep getting this error message:
    Unable to set breakpoint (C:\Program Files\JDeveloper\jdev\mywork\ADReports\ADReportsProject\packagebody staging.staging_reports.sql 57), unable to resolve Java package.
    The Debugger doesn't seem to stop at the specified break point in the package body. Though it does connect to the DB, and shows all the data values inside the procs, and other stuff as mentioned in the debug tutorial/manual.
    Some replied to my previous post saying that it was a bug with the JDeveloper itself and it has been fixed, so if this is the case, can someone point me to the right place where we can download the bug free version.
    Thanks in advance

    Hi,
    Please see:
    PL/SQL Debugging does not stop on breakpoint
    - Mark

  • Passing array of timestamps into oracle stored proc

    Hey there,
    I have an interesting problem. I need to pass an array of java.sql.Timestamp into a stored proc.
    I see that the PreparedStatement provides a setArray() method which takes as arguments an int, java.sql.Array
    Anybody know how I can use the java.sql.Array to my advantage here ? Basically, I don't see how I can create a java.sql.Array of Timestamps
    thanks in advance for all your help.
    Manish Mandelia

    The java.sql.Array implementation is provided by your jdbc driver.
    For exemple using Oracle you can obtain an sql.Array with something like this :
    Connection con=getConnection() // get a connection to the DB
    //first declare what type of array you will use in the DB
    // you probably want to replace CHAR(7) by Timestamp here
    PreparedStatement createArray=
    con.prepareStatement("CREATE OR REPLACE TYPE MYARRAY AS VARRAY(100) OF CHAR(7)");
    createArray.execute();          
    //then get an java instance of this Array
    oracle.sql.ArrayDescriptor arrayDescriptor = oracle.sql.ArrayDescriptor.createDescriptor("MYARRAY",con);
    // content is used to fill the Array
    String[] content= {"string0", "string1"};
    java.sql.Array sqlArray=new oracle.sql.ARRAY(arrayDescriptor, con, content);               
    // then call your stored procedure
    java.sql.CallableStatement callStmt=con.prepareCall("call MyStoredProcedure(?)");
    // passing the array as an argument
    callStmt.setArray(1,sqlArray);
    callStmt.execute();
    As you can see the code is quite database specific.
    hope that helps.

  • Stored Procs problems

    Hi EveryBody,
    I might sound silly with my problems but please reply me with best possible solutions.
    Let me clear the scenario first
    I am having Oracle 8.1.7.2 on sunsparc solaris machines as production system and oracle 8.1.7.5 on intel server with windows as testing machine.
    I have written some stored procs that get executed very finely on my testing machine but they take ten times more time on my production server even after we bring down the application and only database is kept up.
    We looked up for few things here and there and these are our findings
    1) A lot number of sessions are created with the user(that is having all tables we are firing our procs upon) . I want to know can a stored proc also create different sessions (bcoz 1 stored proc is callling two or more procs)
    2)There are a few cron jobs executing that are used for analyze of the tables that we fire our procs upon. Could this also hamper performance of stored procs.
    3) In the v$session_longops we found that there are few Table Scan and Index Scan processes that were showing time remaining of more than 20 hrs. the sid for these longops did not belong to usernames with which any app. or any user logs into oracle.
    4) One of my procs does not responds for a no. of hrs but as soon as we kill the session using (alter system kill session) it starts populating the table and generating results. And the session gets marked for killed but never gets killed.
    Please help me for these issues

    hi kamal
    data volume on both servers is same as first i took backup of production server by exporting it to dmp and then imported it to test server.
    the scripts of procs are same for both infact scripts were first developed on test server and after testing there only we put those scripts in production
    i dont have any idea about tkproof (completely new term for me or if u r using it as an abbreviation)
    moreover the tables have been analyaed on both servers.

  • Call EJB From Oracle Stored proc or Database loaded Java?

    Are there any examples of calling an EJB, residing in the OC4J on a machine separate from the DB server,
    from an Oracle PL/SQL stored proc.
    The Stored proc can call java loaded into the DB. That java makes the intial bean context. Or another way if suggested.
    The reason is that I need to use some drivers that I have so far been unable to load directly into the DB using
    loadjava util. I plan on using the driver in the EJB, located on a different machine. But I'd like so know if its possible to
    make the IntialContext call to the EJB container from PL/SQL. Are the OC4J drivers loadable to be
    able to be called from a database loaded java class? ( I might be a little off on my terminology)
    Bob
    [email protected]

    Hi Bob,
    Your question has been previously asked on this forum many times already.
    You can probably find the relevant postings by doing a search of the
    forum archives.
    To summarize those posts, as I understand it, the latest version of OC4J
    (version 9.0.3) contains a "oc4jclient.jar" file (I think that's the name
    of the file), that can be loaded into the Oracle database (using the
    "loadjava" utility), and which allows a java stored procedure to invoke
    methods on an EJB residing in OC4J.
    Please note that I have not tried any of the above -- I am only summarizing
    for you what has already been posted. And like I said before, a search
    of the forum archives will probably give you more details.
    Good Luck,
    Avi.

  • Here's how to pass XML as a parameter to an Oracle stored proc

    This, or something like it, should be all over the web and I intend to do so.
    The first sample has exactly what you need in order to pass "XML" as a parm to a stored proc.
    http://www.oracle-base.com/forums/viewtopic.php?f=2&t=8468

    > Really, what is the difference between the 2?
    "What is a...?" questions are easily answered by Google. Generally speaking, however, "JavaScript" is Netscape's implementation of ECMAScript, a scripting language primarily for client-side development for a web browser. "Java" is an entire platform, but typically refers to an object-oriented programming language that is typically compiled to bytecode and run in a virtual machine.
    They're not the same thing at all.
    ~

  • S'one tell me how to call Oracle Stored Proc from Java

    Hi,
    I have a problem in calling the Stored proc using callable statement.It looks like we are doing the same thing or no..
    Pl..let me know if you can correct me..Am enclosing the stored proc and java Code...
    CREATE OR REPLACE PROCEDURE StoreFTPAddress (FTP in FTPTYPE) is
    BEGIN
    INSERT INTO DES.FTPSERVICE(
    FTPID,
    COMPANYID,
    SERVERNAME,
    DIRECTORY,
    USERNAME,
    PASSWORD,
    INSTRUCTIONS)
    VALUES( FTPID.NEXTVAL,
    FTP.COMPANYID,
    FTP.SERVERNAME,
    FTP.DIRECTORY,
    FTP.USERNAME,
    FTP.PASSWORD,
    FTP.INSTRUCTIONS);
    END;
    JAVA CODE :;
    public String retrieveFormatExtension(String formatName)
    OracleResultSet rs_form = null;
    try
    conn = ConnectionDataObjectImpl.getConnection();
    Statement stmt = conn.createStatement();
    String sql_retrieve = "{call retrieveFormatExtension} " ;
    CallableStatement cst = conn.prepareCall(
    "{call retrieveFormatExtension(?,?)}");
    cst.setString(1," FName ");
    cst.registerOutParameter(1, OracleTypes.VARCHAR); // OUT Parameter
    cst.executeQuery();
    rs_form = (OracleResultSet) cst.getObject(1);
    cst.close();
    catch (SQLException ex)
    System.out.println("SQLException : " + ex.getMessage());
    return null;
    Regards
    Deepauk
    [email protected]
    null

    Syntactically it looks fine. Only thing is u r calling the proc with wrong name. Your procedure takes only one parameter and i.e
    IN type. I think u need to correct ur preparecall statement.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Ayappa:
    Hi,
    I have a problem in calling the Stored proc using callable statement.It looks like we are doing the same thing or no..
    Pl..let me know if you can correct me..Am enclosing the stored proc and java Code...
    CREATE OR REPLACE PROCEDURE StoreFTPAddress (FTP in FTPTYPE) is
    BEGIN
    INSERT INTO DES.FTPSERVICE(
    FTPID,
    COMPANYID,
    SERVERNAME,
    DIRECTORY,
    USERNAME,
    PASSWORD,
    INSTRUCTIONS)
    VALUES( FTPID.NEXTVAL,
    FTP.COMPANYID,
    FTP.SERVERNAME,
    FTP.DIRECTORY,
    FTP.USERNAME,
    FTP.PASSWORD,
    FTP.INSTRUCTIONS);
    END;
    JAVA CODE :;
    public String retrieveFormatExtension(String formatName)
    OracleResultSet rs_form = null;
    try
    conn = ConnectionDataObjectImpl.getConnection();
    Statement stmt = conn.createStatement();
    String sql_retrieve = "{call retrieveFormatExtension} " ;
    CallableStatement cst = conn.prepareCall(
    "{call retrieveFormatExtension(?,?)}");
    cst.setString(1," FName ");
    cst.registerOutParameter(1, OracleTypes.VARCHAR); // OUT Parameter
    cst.executeQuery();
    rs_form = (OracleResultSet) cst.getObject(1);
    cst.close();
    catch (SQLException ex)
    System.out.println("SQLException : " + ex.getMessage());
    return null;
    Regards
    Deepauk
    [email protected]
    <HR></BLOCKQUOTE>
    null

  • Return String from Oracle stored proc using Excel 2003 VBA

    Hi to everyone,
    I've got a problem that remains unsolved for many days. I am trying to return a value of an oracle stored procedure using Excel VBA. It might seem trivial, however it's not for someone, who has never done it before...
    OS: Win XP SP3
    Excel 2003
    Ora Client: 11g
    By trying different things I have noticed, that I could have troubles with the ODBC-connection. Maybe I am not using the right one. To store data returned from select statements I have an ODBC-Connection (Driver: Oracle in XE), which works perfectly, e.g.:
    Sub Extract_Data()
    Dim cn As ADODB.Connection
    Dim rs As ADODB.Recordset
    Dim db_name, UserName, Password As String
    cn.Open db_name, USerName, Password
    sql_statement = "SELECT some_text FROM some_table"
    Set rs = cn.Execute(sql_statement)
    rs.MoveFirst 'jump to the first entry in the data list
    Row = 2
    While Not rs.EOF
    'save the data to a worksheet
    ip.Cells(Row, 2) = rs(0).Value
    Row = Row + 1
    rs.MoveNext
    Wend
    End Sub
    Now I need to execute a stored procedure to return a semi-colon delimited string.
    I have tried the following:
    Public Sub obj_class()
    Dim cn As New ADODB.Connection
    Dim strSQL, cn As String
    Dim adoCMD As ADODB.Command
    Dim adoRS As ADODB.Recordset
    Set wb = Excel.ActiveWorkbook
    Set ih = wb.Sheets("InfoSheet")
    cn.Open db_name, UserName, Password
    Set adoCMD = New ADODB.Command
    With adoCMD
    .ActiveConnection = cn
    .CommandText = "S#mdb$stg_da_extr_util.get_all_classes_of_classif"
    .CommandType = adCmdStoredProc
    .Parameters.Refresh
    '------ and here comes the error saying:
    '------ could not find the object in the collection corresponding to the name or ordinal reference requested by the application
    .Parameters("i_caller").Value = "'STG_DATA_REQUEST'"
    .Parameters("i_obj_classif_id").Value = 120
    Set adoRS = .Execute()
    End With
    End Sub
    I did asked on the forum:
    http://www.access-programmers.co.uk/forums/showthread.php?p=1241667#post1241667
    but unfortunately without success.
    Could it be, that my ODBC-connection is wrong? When debugging the connection string, I find the Provider=MSDASQL5.1.
    I have moderate knowledge in VBA, but absolutely a newbie with Oracle DB. Is there any source of information that can help solving this issue? Looking forward to hearing from you, as I am almost giving up... ;(

    My VBA is super rusty. Does that error come after Parameters.Refresh, or after .Parameters("i_caller").Value = "'STG_DATA_REQUEST'"?
    If it's the second one, you'll need the definition of the stored procedure so you can see what parameters it's expecting. That'd mean you're getting something wrong with the names.

  • Stored Proc Problem

    Hi everyone,
    I have inherited a classic asp site that uses stored procs with a SQL 2005 Server. The problem is this, when I open up "Command" to view the data that my predecessor used all seems ok as I am not an expert in Stored Procs and am just learning this web application. I do not make any changes and then select "OK" - when I do this an error comes up telling me that there is a "MIssing Run Time Variable" for a particular variable. The site itself works well so the error seems incorrect.
    Because I inherited the site and do not have access to my predecessors computer is there a chance that because I am opening the "Command" box for the first time that I am not seeing exactly what was added into it originally??
    I am at a bit of a loss and would really appreciate a steer in the right direction.
    Many thanks
    Scott

    I would not worry too much if it works. I have noticed that if I enter 'custom' code that DW gives me error messages when the code is actually O/k.
    HTH

  • Business Objects XI R2 - Oracle Stored Proc - Deski report failing

    Business Objects XI R2
    Hi All,
    I have a stored proc created in Oracle 10 - see bottom for code
    I run a deski report on iit - using it as a datasource. This works fine in Desktop Intelligence until I schedule the report from infoview - then I get the following error...
    "Object failed to run due to an error while processing on the Job Server"
    My other deski reports based on Universes are ok.
    create or replace procedure test_PROC1
    (Test_Rpt_Cur OUT SYS_REFCURSOR)
    is
    begin
    open Test_Rpt_Cur FOR
    SELECT ID, FIRSTNAME, LASTNAME
    FROM test_table;
    end test_proc1;

    Hi,
    Cause of this issue :
    Once the Job Server recieves the scheduled job and spawns a new child process, the child process is unable to complete the job. The child process constantly is waiting to load the job. Looking further into the log and specifically the startup script, the -port option was incorrectly used (-restart-port) and didn't allow the child process to bind to the correct port using the correct DNS name. 
    In Order to resolve this issue follow the steps given below..
    1.Open CCM
    2. Stop Server
    3. Right Click Server and go to Properties
    4. insert -port option in to command line, example below
    ex. "
    win2k3\C$\ProgramFiles\Business Objects\BusinessObjects Enterprise 11.5\win32_x86\JobServerFullClient.exe" -service -name win2k3.Desktop_IntelligenceJobServer  -ns win2k3 -objectType CrystalEnterprise.FullClient -lib pp_procFC  -jsTypeDescription "Desktop Intelligence Job Server" -maxDesktops 0 -restart -port win2k3.it.bo.example
    5. Save setting and restart server.
    Hope it helps.
    Regards,
    Sandeep Singh

  • Call stored proc problem (SQL exception)

    Hello
    I have a stored procedure with one param
    as follows:
    PROCEDURE test1 (xnrid IN VARCHAR2)
    This stored procedure is created in package known as "smart".
    I tried to call my stored proc via toplink as follows:
              UnitOfWork uow= dbSession.acquireUnitOfWork();
              StoredProcedureCall storedProcedureCall = new StoredProcedureCall();
              storedProcedureCall.setProcedureName("smart.test1");
              storedProcedureCall.addNamedArgument("xnrid");
              DataReadQuery query = new DataReadQuery();
              query.setCall(storedProcedureCall);
              Vector parameters = new Vector();
              //storedProcedureCall.setUsesBinding(true);
              /** For all input params **/
              query.addArgument("xnrid");
              parameters.add("ffff");
              /** execute query **/
              Object result = dbSession.executeQuery(query, parameters);
    And I have good oracle exception such as
    Internal Exception: java.sql.SQLException: ORA-00900: invalid SQL statement
    Error Code: 900
    Call:BEGIN smart.test1(xnrid=>'ffff'); END;
    Any help is appreciated
    gurcan

    Hi Sharon
    1. You said this code is written in the stored procedure.
    2. The scope of the temporary table is valid till its executer's session is valid.
    3. So if you execute the stored procedure and then try to find these temporary tables then you wont find them as the stored procedure has already finished its execution. And as soon as the execution of the stored procedure is over these temporary tables are automatically deleted.
    4. If you try to execute the code individually then it will show up untill you are logged on. And as your session is valid (Untill you are logged on), SQL Server will show up the tables.
    5. As a proof-of-concept:
    - Logon to SQL Server.
    - Create a temporary table.
    - Log off from SQL Server.
    - Log on again and try to find the temp table you created. It would not be there as it was valid only for your earlier session.
    Let me know if you have any further queries.
    Regards
    Nikhil

  • How to SEND PAGE from Oracle stored proc

    I've searched all Oracle docs and internet. Need to be able to
    send a msg to a pager via SMS (or some other method) from a
    stored proc. Saw some mention of Oracle Paging Server but not
    much doc on implementing. Please feel free to post here or
    mailto:[email protected]

    if you need to send sms message you need to have wapgateway and
    wml background

  • Using Oracle Stored Proc as Data Source for PowerBuilder Data Window Object

    Hi,
    I'm trying to use an Oracle stored procedure as the data source for a PowerBuilder data window object. I'm using the following (which is a variation of an example given on Sybase's web site, with the appropriate database/column name changes and use of %TYPE):
    ======================
    CREATE OR REPLACE PACKAGE pkg_dw_sp_example
    AS
    TYPE typ_example_rec1 IS RECORD(
    v_comcodsa st_sa.comcodsa%TYPE,
    v_comnamsa st_sa.comnamsa%TYPE,
    v_cocitysa st_sa.cocitysa%TYPE);
    TYPE cur_example_cur1 IS REF CURSOR;
    RETURN typ_example_rec1;
    END;
    ======================
    CREATE OR REPLACE PROCEDURE sp_dw_example1
    (arg_teamid IN st_sa.comcodsa%TYPE,
    cur_team IN OUT pkg_dw_sp_example.cur_example_cur1)
    AS
    BEGIN
    OPEN cur_team FOR
              SELECT comcodsa,
              comnamsa,
              cocitysa
              FROM st_sa
              WHERE st_sa.comcodha = arg_teamid;
    END sp_dw_example1;
    ======================
    The package is created okay, but the procedure is saved with compilation errors. Unfortunately, Oracle does not indicate what the errors are (great product), so I have no idea what it is complaining about.
    Questions:
    1) Can anyone point me to/or provide a better example?
    2) The examples in books I have seen all would have declared the procedure in the package specification - is the above valid?
    3) This is a PowerBuilder specific question, but if the package does not show up in the stored procedure list when creating a data window object, how does one use it as a data source?
    Oracle 8.1.7
    PowerBuilder 8.0.1
    Thanks,
    Ed Holloman

    1) Everything looks fine with your code. You did not mention the environment you are compiling your code in, but if it is SQL*Plus, you can type 'show errors' after the compile and it will list the errors and line numbers for you.
    2) You can include the procedure in the package - in which case you would have a procedure declaration in the spec and the actual procedure in the body. You would no longer include the 'create or replace' - the declaration and procedure would just start with 'procedure'. The spec would look include:
    PROCEDURE sp_dw_example1
      (arg_teamid IN st_sa.comcodsa%TYPE,
       cur_team OUT cur_example_cur1);Note the removal of the package reference (since we are now IN the package) and the second parameter is just OUT instead of IN OUT.
    3) Not much, but I know that in PB8, our developers have said they have visibility now to the package when creating a DW - something they didn't have in PB7. Previously, we had to create a dummy standalone procedure that they would select and they would later modify the code to include the package prefix.
    Hope this helps a bit.

  • How to execute/call a cfm file in an Oracle stored proc?

    Hello everyone! I'm quite new to Oracle PL/SQL stored
    procedure. Is it possible and how do you call/execute a coldfusion
    file from an Oracle stored procedure? I know that cfm files can
    call stored procedures. How about the other way around? Any ideas
    or suggestions is much appreciated. Thanks..

    I'm having a hard time trying to think of why you would
    actually want to do something like that. However, all that aside,
    the short answer is no. The database has no real "knowledge" about
    ColdFusion, and there is no way for PL/SQL to "execute" anything on
    the ColdFusion server. Maybe if you were more specific as to what
    you were actually trying to do rather than such a generic question,
    someone might be able to help you find an alternative.
    Phil

  • Java Stored proc problem

    When I am trying to create a procedure with below details gives the following errors:
    create or replace
    Procedure test ( id IN NUMBER,
    i IN NUMBER,
    j IN VARCHAR2,
    ret1 OUT NUMBER,
    ret2 OUT VARCHAR2,
    k IN NUMBER) AS
    LANGUAGE JAVA NAME 'com.fn.oracle.proc.trading.TestProcedure.testIt(int, double, java.lang.String, int, java.lang.String, int)';
    PL/SQL: Compilation unit analysis terminated
    PLS-00235: the external type is not appropriate for the parameter
    Please help me on this..
    Thank you....

    The problem is with the OUT parameters. If you read the documentation you will see that OUT parameters
    need to be declared as one element arrays. Hence this should compile:
    CREATE OR REPLACE PROCEDURE TEST ( id IN NUMBER,
    i IN NUMBER,
    j IN VARCHAR2,
    ret1 OUT NUMBER,
    ret2 OUT VARCHAR2,
    k IN NUMBER) AS
    LANGUAGE JAVA NAME 'com.fn.oracle.proc.trading.TestProcedure.testIt(int, double, java.lang.String, int[], java.lang.String[], int)';Cheers, APC

Maybe you are looking for

  • How to fix an object in one layer to an object in another layer?

    I have tried to find a soloution to this in the forum, but perhaps my english not being native prevents me from using the correct search terms - so here it is for you to solve Layer one: background with some rocks Layer two: a person standing in fron

  • [ACCEPT][PROMPT] Input not taken into account in the script

    Hi, I'm preparing sql scripts to create schemas, one of the script is the main one. In that one I'm requesting the passwords for two users, and a path to create an oracle directory. The password for the first user and the path are taken into account.

  • Error while using "HTML Standard Editor" item in "Array VPN"

    Hi, The "HTML Standard Editor" item is not displayed properly when the person is trying to enter data, when he is logged in using Array VPN. An error appears in the item box "Unable to Process request. The requested URL has an unsupported encoding.".

  • Random disappearing of scenes and strange behavior of mouse.

    I am modelling a school project and I have included a number of images and sounds in every scene of my 10 scene project. These have behaviours associated with them, which could for example be 'go to frame' etc. When I finally publish my project, some

  • Dreamweaver CS3 strange FTP problem

    Helllo, I have just passed from windows to Mac (I got Leopard) .... I have installed Dreamweaver CS3 and I have imported all the site definition (like Host FTP, username, password, etc...) from the windows version But when I try to connect to any ser