Help  :   How can i call oracle stored procedure in PHP

i have following stored procedure and i want to call it in PHP.
pls give me syntax how can i call it.
Create or Replace Procedure Insert_profilebasicdetail
p_isubprofileid IN NUMBER,
p_Copyisubprofileid IN NUMBER,
p_itranno IN NUMBER,
As
v_IncKeyID NUMBER;
v_tempkeyId NUMBER;
CURSOR TempInsert IS
SELECT ikeyid,iprofileid,iquestionid,vquestionans,cstatusindi,dmodifyon,imodifyby,iyear,isubprofileid
FROM profilebasicdetail
WHERE isubprofileid=p_Copyisubprofileid and itranno=p_itranno;
BEGIN
SELECT MAX(NVL(iKeyID,0))
INTO v_IncKeyID
FROM profilebasicdetail;
FOR r in TempInsert LOOP
v_IncKeyID := v_IncKeyID + 1;
Insert into profilebasicdetail
(ikeyid,iprofileid,iquestionid,vquestionans,cstatusindi,dmodifyon,imodifyby,itranno,iyear,isubprofileid)
select v_IncKeyID,r.iprofileid,r.iquestionid,r.vquestionans,
r.cstatusindi,r.dmodifyon,r.imodifyby,1,
r.iyear,p_isubprofileid
from profilebasicdetail
where ikeyId=r.ikeyId;
END LOOP;
EXCEPTION
WHEN others THEN
raise;
End;
Thanks
all

Hi, your SP have an error in the sentence "p_itranno IN NUMBER,)"... the comma is the error.
In order to use the SP from PHP you have write...
<?php
$sth = oci_parse($dbh, "begin Insert_profilebasicdetail (:isubprofileid , :copyisubprofileid, :itranno); end;"
oci_bind_by_name($sth, ": isubprofileid ", $youparameter1);
oci_bind_by_name($sth, ": copyisubprofileid", $youparameter2);
oci_bind_by_name($sth, ": itranno", $youparameter2);
oci_execute($sth);
?>

Similar Messages

  • How can i call a Stored Procedure procedure from Unix shell script

    Hi All,
    I want to call a Strored PL-SQL Procedure through Unix shell script.
    Can any body help me with this.
    Regards,
    Saurabh

    I prefer a seperate script like the other poster mentioned. However, most shells can use a 'here' document as well ...
    sqlplus uid/pwd <<END
    exec myproc
    exit
    ENDRichard

  • How to call oracle stored procedure

    how to call oracle stored procedure using
    jdevloper.can any one help?
    thanks
    pullareddy

    Connection conn =
    DriverManager.getConnection("your connect string");
    CallableStatement stm=conn.prepareCall( "{?=call getDeptName(?)}");
    stm.registerOutParameter(1,OracleTypes.VARCHAR);
    int deptno=10;
    stm.setInt(2,deptno);
    stm.execute();
    String dname=stm.getString(1);
    stm.close();
    conn.close();
    getDeptName is a function:
    FUNCTION
    getDeptName(id IN NUMBER) RETURN VARCHAR2...

  • Can we call a stored procedure from a Trigger

    Hello Everyone,
    I need some help in writing the triggers in Oracle 10g Database.
    Can we call a stored procedure from a trigger?

    Can we call a stored procedure from a trigger? Yes. Why did you think we couldn't?
    Cheers, APC

  • PLS-00306:NET to call Oracle stored procedure,Use Array parameters

    Development Environment:Windows 2003 SP2+Oracle 10g
    . NET to call Oracle stored procedure, use an array of types of parameters
    Step1:(In the Oracle database define an array of types)
    CREATE OR REPLACE TYPE STRING_VARRAY AS VARRAY (1000) OF NVARCHAR2(255)
    OR
    CREATE OR REPLACE type string_array is table of nvarchar2(255)
    Step2:
    CREATE OR REPLACE PROCEDURE Test
    (i_test in string_varray,o_result out int)
    IS
    BEGIN
    o_result:=i_test.count;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    NULL;
    WHEN OTHERS
    THEN
    o_result:=0;
    END arraytest;
    Step3:
    ODP.NET(Oracle 10g)
    OracleConnection conn = new OracleConnection("User Id=test;Password=test;Data Source=test");
    OracleCommand cmd = new OracleCommand("Test", conn);
    cmd.CommandType = CommandType.StoredProcedure;
    string[] str = new string[2] { "11", "222" };
    cmd.ArrayBindCount=2;
    OracleParameter p1 = new OracleParameter("i_test", OracleDbType.NVarChar);
    p1.Direction = ParameterDirection.Input;
    p1.CollectionType = OracleCollectionType.PLSQLAssociativeArray;
    p1.Value = str;
    p1.ArrayBindSize=new int[2]{2,3};
    p1.ArrayBindStatus = new OracleParameterStatus[2]{
    OracleParameterStatus.Success,
    OracleParameterStatus.Success
    cmd.Parameters.Add(p1);
    OracleParameter p2 = new OracleParameter("o_result", OracleDbType.Int32);
    p2.Direction = ParameterDirection.Output;
    P2.CollectionType = OracleCollectionType.PLSQLAssociativeArray;
    p2.Value=0;
    cmd.Parameters.Add(p2);
    int i = 0;
    try
    conn.Open();
    cmd.ExecuteNonQuery();
    i =(int) p2.Value;
    catch (Exception ex)
    finally
    conn.Close();
    Error:
    Execution Failed:ORA-06550:Line 1,Column 7:
    PLS-00306:Test parameters when calling the number or types of errors
    ORA-06550:Line 1,Column 7:
    PL/SQL:Statement ignored

    Hi,
    See the answer in [this thread|http://forums.oracle.com/forums/thread.jspa?threadID=909564&tstart=0]
    Hope it helps,
    Greg

  • Can i call a stored procedure from OracleDashboardPrompt?

    Hi,
    Can i call a stored procedure from OracleDashboardPrompt once i click the Go button in OBIEE?The input parameters to the procedure are the one that i have given in DashboardPrompt.and based on the result of the procedure(either 0 or 1),i have to display reports.Can anyone help me.
    Thanks in Advance...

    Please find below the possible approach to the scenario:
    1.Create a prompt for the column which you need as input to store proc and create a presentation variable for that .
    2.Create a dummy report with 1 column which will have the above created presentation variable as filter(We can design this reports in such a way like the first column will get filtered based on the presentation variable)
    3.Create a second column and in the column definition we can add a code like
    evaluate('StoreProc(%1)','@{firstcolumn}')
    4.We can hide the first column in the report and only show the output of store proc to the end user
    Hope this helps :)

  • . NET to call Oracle stored procedure, use an array of types of parameters

    . NET to call Oracle stored procedure, use an array of types of parameters
    Step1:(In the Oracle database define an array of types)
    CREATE OR REPLACE TYPE STRING_VARRAY AS VARRAY (1000) OF NVARCHAR2(255)
    Step2:
    CREATE OR REPLACE PROCEDURE Test
    (i_test in string_varray,o_result out int)
    IS
    BEGIN
    o_result:=i_test.count;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    NULL;
    WHEN OTHERS
    THEN
    o_result:=0;
    END arraytest;
    Step3:
    Use System.Data.OracleClient
    C# Code:
    OracleConnection conn = new OracleConnection("User Id=test;Password=test;Data Source=test");
    OracleCommand cmd = new OracleCommand("Test", conn);
    cmd.CommandType = CommandType.StoredProcedure;
    string[] str = new string[] { "11", "22" };
    OracleParameter p1 = new OracleParameter("i_test", OracleType.NVarChar);
    p1.Direction = ParameterDirection.Input;
    p1.Value = str;
    cmd.Parameters.Add(p1);
    OracleParameter p2 = new OracleParameter("o_result", OracleType.Int32);
    p2.Direction = ParameterDirection.Output;
    cmd.Parameters.Add(p2);
    int i = 0;
    try
    conn.Open();
    cmd.ExecuteNonQuery();
    i =(int) p2.Value;
    catch (Exception ex)
    finally
    conn.Close();
    Error:
    Execution Failed:ORA-06550:Line 1,Column 7:
    PLS-00306:Test parameters when calling the number or types of errors
    ORA-06550:Line 1,Column 7:
    PL/SQL:Statement ignored
    Edited by: user10133982 on Jun 4, 2009 7:13 AM

    . NET to call Oracle stored procedure, use an array of types of parameters
    The use of ODP.net(Oracle 10g), the error is still the same
    Step1:(In the Oracle database define an array of types)
    CREATE OR REPLACE TYPE STRING_VARRAY AS VARRAY (1000) OF NVARCHAR2(255)
    Step2:
    CREATE OR REPLACE PROCEDURE Test
    (i_test in string_varray,o_result out int)
    IS
    BEGIN
    o_result:=i_test.count;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    NULL;
    WHEN OTHERS
    THEN
    o_result:=0;
    END arraytest;
    Step3:
    ODP.NET(Oracle 10g)
    OracleConnection conn = new OracleConnection("User Id=test;Password=test;Data Source=test");
    OracleCommand cmd = new OracleCommand("Test", conn);
    cmd.CommandType = CommandType.StoredProcedure;
    string[] str = new string[2] { "11", "222" };
    cmd.ArrayBindCount=2;
    OracleParameter p1 = new OracleParameter("i_test", OracleDbType.NVarChar);
    p1.Direction = ParameterDirection.Input;
    p1.CollectionType = OracleCollectionType.PLSQLAssociativeArray;
    p1.Value = str;
    p1.ArrayBindSize=new int[2]{2,3};
    p1.ArrayBindStatus = new OracleParameterStatus[2]{
    OracleParameterStatus.Success,
    OracleParameterStatus.Success
    cmd.Parameters.Add(p1);
    OracleParameter p2 = new OracleParameter("o_result", OracleDbType.Int32);
    p2.Direction = ParameterDirection.Output;
    P2.CollectionType = OracleCollectionType.PLSQLAssociativeArray;
    p2.Value=0;
    cmd.Parameters.Add(p2);
    int i = 0;
    try
    conn.Open();
    cmd.ExecuteNonQuery();
    i =(int) p2.Value;
    catch (Exception ex)
    finally
    conn.Close();
    Error:
    Execution Failed:ORA-06550:Line 1,Column 7:
    PLS-00306:Test parameters when calling the number or types of errors
    ORA-06550:Line 1,Column 7:
    PL/SQL:Statement ignored
    Edited by: user10133982 on Jun 5, 2009 7:48 AM

  • How to call Oracle Stored Procedure using EDQ

    Can someone tell me how to use Oracle Stored Procedure call in EDQ, sample scripts/steps will be really helpful. Thanks!

    It is also possible to do this using a custom processor in EDQ. The processor needs to do something very similar to the external task above (opens a DB connection, authenticates, runs a stored procedure).
    If you need this, please talk us through the use case so we can determine if it is the best fit. In some ways, an external task is better as logically a stored procedure call is normally divorced from any process logic in EDQ.
    Regards,
    Mike

  • How to call oracle stored procedure with OUT parameter?

    I create oracle stored procedure in eclipse oepe
    PROCEDURE SP_SELECT_ORA (
    ID_INPUT IN VARCHAR2,
    ID_OUTPUT OUT VARCHAR2,
    PASSWD_OUTPUT OUT VARCHAR2,
    NAME_OUTPUT OUT VARCHAR2) IS
    BEGIN
    SELECT EMP_ID, EMP_Passwd, EMP_Name
    INTO ID_OUTPUT, PASSWD_OUTPUT, NAME_OUTPUT
    FROM family
    WHERE EMP_ID = ID_INPUT;
    END;
    and I try to call the sp in jpa like below,
    @NamedNativeQueries({
         @NamedNativeQuery(name = "callSelectSP", query = "call SP_SELECT_ORA(?,?,?,?)", resultClass = Members.class)
    @Entity
    @Table(name="family")
    public class Members implements Serializable {
         @Id
         @Column(name = "EMP_ID")
         private String ID;
         @Column(name = "EMP_Passwd")
         private String Passwd;
         @Column(name = "EMP_Name")
         private String Name;
    ==============
    @PersistenceContext(unitName="MyFamily")
         EntityManager em;
    query = em.createNamedQuery("callSelectSP");
         query.setParameter(1, ID);
         String id_output = null;
         String passwd_output = null;
         String name_output = null;
         query.setParameter(2,id_output);
         query.setParameter(3,passwd_output);
         query.setParameter(4,name_output);
         query.executeUpdate();
         member = (Members)query.getSingleResult();
    But this query throws exception,
    19:55:35,500 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http--127.0.0.1-8080-1) SQL Error: 1465, SQLState: 72000
    19:55:35,500 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http--127.0.0.1-8080-1) ORA-01465: invalid hex number
    I don't know how. Pls, give me your advice. Thanks in advnace.
    Best regards

    Thank you for your reply, Chris!
    I tried this one.
    @NamedNativeQueries({
    @NamedNativeQuery(name = "callSelectSP", query = "exec SP_SELECT_ORA( ?, :id_output, :passwd_output, :name_output) " , resultClass = Members.class)
    @Entity
    @Table(name="family")
    public class Members implements Serializable
    ===================
    query = em.createNamedQuery("callSelectSP");
    query.setParameter(1, ID);
    String id_output = null;
    String passwd_output = null;
    String name_output = null;
    query.setParameter("id_output", id_output);
    query.setParameter("passwd_output", passwd_output);
    query.setParameter("name_output",name_output);
    query.executeUpdate();
    On Console hibernate shew the sql and ora # like below,
    19:59:25,160 INFO [stdout] (http--127.0.0.1-8080-1) Hibernate: exec SP_SELECT_ORA( ?, ?, ?, ?)
    19:59:25,192 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http--127.0.0.1-8080-1) SQL Error: 900, SQLState: 42000
    19:59:25,192 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http--127.0.0.1-8080-1) ORA-00900: Invalid SQL statement
    Pls, inform me your advice. Thanks in advance.
    Best regards.

  • Calling Oracle Stored Procedure from BC4J JSP App

    I am on an extremely tight deadline and am trying to get my JSP application to use an Oracle Stored Procedure. I need to take some input from the user and send these values as parameters. Has anyone worked with Stored Procedures in JDev3.1? Please reply with some sample code if possible.
    Thanks.

    Hi,
    Someone posted a similar request the other day. Here is my response to them:
    Basically, you need to create a custom method from your JSP's ViewObject, which calls the stored procedure. You can then call the ViewObject's custom method from the JSP client.
    Here is how I have done it:
    1. Choose the ViewObject that your JSP is based on and choose 'Edit' from the context menu.
    2. On the Java tab of the ViewObject wizard, choose Generate Java File checkbox for the View Object Class and click the Finish button. A file is created under the ViewObject node in the Navigator named 'viewobjectImpl.java'.
    3. Open the viewobjectImpl.java file in the code editor and create a method to call your stored procedure (see sample code below).
    4. Compile the VOImpl.java file.
    5. Choose the view object again, and choose Edit again from the context menu.
    6. On the Client Methods tab, you should now see your method appear in the Available field. Select it and shuttle it to the Selected field.
    7. Click Finish to leave the VO wizard, and rebuild your Business Components project.
    8. In your JSP, call the custom method (see sample code below).
    sample code for custom method calling a stored procedure from VOImpl.java file:
    public int getTotalHits(String mon, String year) {
    CallableStatement stmt = null;
    int total;
    // the call to the PL/SQL stored proc
    String totalhits = "{? = call walkthru.total_hits(?,?)}";
    // use the AM conxn 2 call storedproc
    stmt = getDBTransaction().createCallableStatement(totalhits, 1);
    try
    // Bind the Statement Parameters and //Execute this Statement
    stmt.registerOutParameter(1,Types.INTEGER);
    stmt.setString(2,mon); stmt.setString(3,year);
    stmt.execute();
    total = stmt.getInt(1);
    catch (Exception ex)
    throw new oracle.jbo.JboException(ex);
    finally
    try
    stmt.close();
    catch (Exception nex)
    return total;
    sample render code for calling custom method from JSP custom bean:
    public void render() {
    int totalhits;
    try
    Row[] rows;
    // Retrieve all records by default, the qView variable is defined in the base class
    qView.setRangeSize(-1);
    qView.first();
    rows = qView.getAllRowsInRange();
    // instantiate a view object for our exported method
    // and call the stored procedure to get the total
    ViewObject vo = qView.getViewObject();
    wtQueryView theView = (wtQueryView) vo;
    totalhits = theView.getTotalHits(session.getValue("m").toString(),session.getValue("y").toString());
    out.println(totalhits);
    } catch(Exception ex)
    throw new RuntimeException(ex.getMessage());
    }

  • How to execute oracle stored procedure through php as externally?

    hi...
    i am searching for the way that how to execute oracle stored procedure through web service, i am using php and mysql, i have some stored procedures in oracale database, i want to execute them, from php, means the database will be remain mysql, and the stored procedures of oracle will be executed externally...
    Kind regards,
    Wilayat.

    Ok, so first of all this is a kind of strange question. Since Oracle and MYSQL can happily live side by side.
    Make sure you have the oracle client (instant or regular ) installed and OCI_8 is set up and working correctly in PHP. If it is, when you run the phpinfo() routine you will see oci_8 on there. IF PHP connects just fine from the command line yet apache wont connect check permissions and things like the LD_Library Path.
    Then in php, right along with your MySQL statements run Oracle Statements eg:
    <?php
    $OraDB = oci_connect(name,pass,tnsname);
    $MySQLdb = mysql_connect([parms]);
    $oraQueryText = "begin sp_some_proc([some parms]); end;" ;
    $mysqlQuery = " Some mysql Query";
    $oraQuery = oci_parse($OraDB,$oraQueryText );
    oci_execute($oraQuery);
    mysql_execute([parms]);
    ?>
    Use the standard fetch code to get data from either of them.
    If you cannot and I mean absolutely cannot get an admin to link in OCI_8 then you still have recourse although it will be tedious as hell. PHP allows you to exec calls to the OS. You still MUST make sure the Oracle Client is installed and that sqlplus runs from the command line. You will more then likely have to have a shell script written to do this as well, but maybe not as I have never tried it with the exception of capturing the return value of sqlplus and you will have to dig into sqlplus to get it to send its results to a file you can then parse with php.
    Good Luck!

  • Getting error while Calling Oracle Stored Procedure with output Parameter

    HI All,
    From long days i am working on this but i unable to solve it.
    Even i have studied so many forums in SAP but i didn't find the solution.
    I am calling Oracle Store procedure with 3 inputs and 1 output without cursor.
    Store Procedure:-
    CREATE OR REPLACE PROCEDURE PDS.send_rm
    IS
    proc_name           VARCHAR2(64) := 'send_rm';
    destination_system  VARCHAR2(32) := 'RAWMAT';
    xml_message         VARCHAR2(4000);
    status_code         INTEGER;
    status_message      VARCHAR2(128);
    debug_message       VARCHAR2(128);
    p_ret               INTEGER;
    BEGIN
      DBMS_OUTPUT.PUT_LINE( proc_name || ' started' );
      xml_message := '<RAW_MATERIAL>'||
                     '<BAR_CODE>10000764601</BAR_CODE>'||
                     '<MATERIAL>1101448</MATERIAL>'||
                     '<VENDOR_CODE/>'||
                     '<PRODUCTION_DATE>0000-00-00</PRODUCTION_DATE>'||
                     '<EXPIRE_DATE>0000-00-00</EXPIRE_DATE>'||
                     '<BATCH/>'||
                     '<PO_NUM/>'||
                     '<MATERIAL_DESCRIPTION>POWER SUPPLY</MATERIAL_DESCRIPTION>'||
                     '<SPEC_NAME/>'||
                     '<STOCK_CODE>BSW-JH</STOCK_CODE>'||
                     '<INSPECTION_LOT>00</INSPECTION_LOT>'||
                     '<USAGE_DECISION_CODE/>'||
                     '<MATERIAL_GROUP>031</MATERIAL_GROUP>'||
                     '</RAW_MATERIAL>';
          dbms_output.put_line('XML '||xml_message);
    --      vp_interface.load_rawmat@cnprpt1_pds(SYSDATE, destination_system,
    --                   xml_message, p_ret);
          vp_interface.load_rawmat(SYSDATE, destination_system,
                       xml_message, p_ret);
          dbms_output.put_line('Return Code '||p_ret);
          COMMIT;
    EXCEPTION
      WHEN OTHERS THEN
        status_code := SQLCODE;
        status_message := SUBSTR(SQLERRM, 1, 64);
    --    Extract_Error_Logger(proc_name, 'LOCAL', SYSDATE, -999,
    --                         status_message, 0, debug_message);
        ROLLBACK;
    END send_rm;
    And while i am calling this Store procedure in MII, I am facing error.
    I have tried different ways but didnt solved
    In SQL Query, i kept mode as: FixedQueryOutput
    Can anyone tell me or send code for calling above store procedure
    And onemore thing, While creating store procedure in Oracle for MII. Do we need to Create output parameter as cursor or normal.  
    Thanks,
    Kind Regards,
    Praveen Reddy M

    Hi Praveen
    Our wrapper was created because we could not modify the procedure we call (it was not returning a cursor).
    CREATE OR REPLACE PROCEDURE CHECK_PUT_IN_USE
    (STRCMPNAME in varchar2,
    STRSCANLABEL in varchar2,
    RCT1 out SYS_REFCURSOR
    AS
      charDispo          Char(1);
      charStatus          Char(1);
      intCatNo          Integer;
      charCatDispo     Char(1);
      strCatQual          VarChar2(2);
      strCatDesc          VarChar2(30);
      strMsg          VarChar2(128);
    BEGIN
    qa.check_put_in_use@AR(STRCMPNAME,
                                              STRSCANLABEL,
                                              charDispo,
                                              charStatus,
                                              intCatNo,
                                              charCatDispo,
                                              strCatQual,
                                              strCatDesc,
                                              strMsg);
    OPEN RCT1
    FOR Select charDispo,charStatus,charDispo,charStatus,intCatNo,charCatDispo,strCatQual,strCatDesc,strMsg from Dual;
    END;
    Hope this helps
    Regards
    Amrik
    then with a FixedQueryWithOutput
    call mixar.qasap.wrapper_update_put_in_use('[Param.1]','[Param.2]',[Param.3],?)
    Hope this helps.

  • Calling Oracle Stored procedure with OUT parameter from ODI

    Hi,
    I called an oracle stored procedure with following anonymous block in the ODI procedure.
    Declare
    Status varchar2(10);
    Begin
    OTM.DeleteTarget('E_KPI_TARGET_VALUE', Status);
    End;
    I want to capture the OUT parameter STATUS value in a project level variable.
    And based on its va;lue I would like to choose between 2 interfaces in my package.
    Please help me in doing this.

    Hi,
    For that kind of situation I commoly use:
    1) one step with:
    create or replace package <%=odiRef.getSchemaName("W")%>.pck_var
    Status varchar2(10);
    end;
    * transaction 9, for instance
    2) step
    Begin
    OTM.DeleteTarget('E_KPI_TARGET_VALUE', <%=odiRef.getSchemaName("W")%>.pck_var.Status);
    End;
    * transaction 9
    3) then, at an ODI variable, use a refresh like:
    select <%=odiRef.getSchemaName("W")%>.pck_var.Status from dual
    at same logical shema where the package was created.
    Does it make sense to you?

  • Problem in calling Oracle stored procedure from Java.

    I am trying to invoke the Oracle stored procedure from Java. The procedure does not take any parameters and does not return anything. If I call it from SQL prompt it is working perfectly. I am calling it in my program as follows.
    callable_stmt=con.prepareCall("{call pkg_name.proc_name()}");
    callable_stmt.execute();
    The problem is the control-of-flow is getting strucked in the second line I wrote. It is not giving any error also.
    Please clarify me what's wrong with my code?
    Seenu.

    And how long does the stored procedure take to run from your client machine when running it via sqlplus?

  • Calling Oracle stored procedure from java

    The following query calls a stored procedure TRANSLATE_ZONEPATH_ID defined in a package MT by the user MTDBA. currentZone is a member variable of the class, and currently has value 1
    This query works just fine when I run it from SQLPlus* connected as MTDBA.
    But from java, the following piece throws exception saying "invalid column name"
    String query = "SELECT MTDBA.MT.TRANSLATE_ZONEPATH_ID('"+currentZone+"') "
    + "FROM DUAL ";
    try
    Statement stmt = conn.createStatement();
    ResultSet rst = stmt.executeQuery(query);
    if (rst.next())
    fullName = rst.getString(1);
    stmt.close();
    Anyone got any clue ?

    I always use CallableStatement to execute a stored procedure or function in a database (Oracle).
    try this:
    <code>
    CallableStatement cs = dbConnection.prepareCall("{ ? =
    MTDBA.MT.TRANSLATE_ZONEPATH_ID(?)}");
    cs.setString(1, currentZone);
    cs.registerOutParameter(1, Types.VARCHAR);
    cs.executeUpdate();
    fullname = cs.getString(1);
    cs.close();
    </code>
    There is also a jdbc forum, where your should post this kind of problem :-)
    Hope this help's
    ThK

Maybe you are looking for

  • Missing external libraries on deployment

    I have created a Web project under IBM Rational Application Developer 7 and a EAR project that deploys that web application under WebSphere v6.1. When I publish the web application on WebSphere, the external libraries are not found or not published w

  • Can't paste into iTunes lyrics

    Up until recently, I have been able to copy lyrics from other sources and then paste them into the lyrics tab of any mp3 file in iTunes. Yesterday, I noticed that that particular functionality is missing. I hit CMD-V in the lyrics tab and nothing hap

  • Forms debug not working in 11g. Working fine in 10g

    I am able to attach the debug of runtime with the random port number, but not stopping at the breakpoints. This is happening in 11g environment. Same method is working in 10g environment. What additional configuration do I need to do to run a form in

  • Optimal system set up

    After a couple of years of using FCP with various G3/G4/G5s, we can finally set up a G5 quad as a dedicated FCP machine. (thank you, thank you). 7800 card and 4.5 gig. Should arrive next week. I was wondering if there are any system tweaks to think a

  • MacBook pro late 2013 - no brightness control even with Bootcamp 5.1.5640

    Dear all, I bought 2 MacBookPro in February 2014, one is late 2013 the other is beginning 2014. I installed Windows 8.1 and Bootcamp assistant 5.1.5640, indicated as the solutin to brightness and keyboard brightness problems. Still, my screen brightn