Help using Java to retrieve XMLType returned from PL/SQL stored object

Hi,
Please bear with me if this is a trivial question. I'm brand new to Java, JDBC, and XML DB. I've been spinning my wheels on this for a few hours now.
I have a table:
XMLDB_USER@xmldb64> desc my_test_table
Name                                      Null?    Type
ID                                                 NUMBER(9)
DOC                                                SYS.XMLTYPE(XMLSchema "http:
                                                    //www.myproquest.com/Global_
                                                    Schema_v3.0.xsd" Element "RE
                                                    CORD") STORAGE BINARYI've written a trivially simple PL/SQL function to retrieve the DOC column, based on the ID passed to it.
create or replace function get_doc(goid in number) return xmltype is
  doc_content xmltype;
begin
  select doc into doc_content from my_test_table where id = goid;
  return doc_content;
end;
/Up to here, everything works fine. I wrote a small anonymous PL/SQL block, and proved that I can call the PL/SQL function successfully.
Now, I want to implement in Java. This is where I get confused.
Currently my code looks like this:
import java.sql.*;
import oracle.jdbc.*;
import oracle.jdbc.OracleTypes;
import oracle.jdbc.pool.OracleDataSource;
import oracle.xdb.*;
import java.io.*;
import java.lang.StringBuilder;
import java.sql.Clob;
class MyJava
  public static void main(String args[]) throws SQLException, IOException
    Clob xml = null;
    System.out.print("Connecting to the database...");
    System.out.flush();
    OracleDataSource ods = new OracleDataSource();
    String URL = "jdbc:oracle:thin:@//pqhdb201.aa1.pqe:1522/xmldb64";
    ods.setURL(URL);
    ods.setUser("xmldb_user");
    ods.setPassword("xmldb_user");
    Connection conn = ods.getConnection();
    System.out.println("connected.");
    System.out.println("GOID to be retrieved is " + args[0]);
    CallableStatement cs1 = null;
try {
    cs1 = conn.prepareCall( "{? = call get_doc (?)}" );
    cs1.registerOutParameter(1,OracleTypes.OPAQUE,"XMLType");
    cs1.setString(2,args[0]);
    cs1.execute();
//    xml = XMLType.createXML(cs1.getOPAQUE(1));
    xml = (Clob) cs1.getObject(1);
//    System.out.println(((XMLType)xml).getStringVal());
//    System.out.println(xml.getClobVal());
    System.out.println(xml.getCharacterStream());
  finally {
     if(cs1!=null) cs1.close();
     if(conn!=null) conn.close();
}This compiles, but when I run, I get:
pqhdb201:[xmldb64]:(/home/oracle/xmldb_scripts):$java MyJava 91455713
Connecting to the database...connected.
GOID to be retrieved is 91455713
Exception in thread "main" java.sql.SQLException: invalid name pattern: XMLDB_USER.XMLType
        at oracle.jdbc.oracore.OracleTypeADT.initMetadata(OracleTypeADT.java:553)
        at oracle.jdbc.oracore.OracleTypeADT.init(OracleTypeADT.java:469)
        at oracle.sql.OpaqueDescriptor.initPickler(OpaqueDescriptor.java:237)
        at oracle.sql.OpaqueDescriptor.<init>(OpaqueDescriptor.java:104)
        at oracle.sql.OpaqueDescriptor.createDescriptor(OpaqueDescriptor.java:220)
        at oracle.sql.OpaqueDescriptor.createDescriptor(OpaqueDescriptor.java:181)
        at oracle.jdbc.driver.NamedTypeAccessor.otypeFromName(NamedTypeAccessor.java:83)
        at oracle.jdbc.driver.TypeAccessor.initMetadata(TypeAccessor.java:89)
        at oracle.jdbc.driver.T4CCallableStatement.allocateAccessor(T4CCallableStatement.java:689)
        at oracle.jdbc.driver.OracleCallableStatement.registerOutParameterInternal(OracleCallableStatement.java:157)
        at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:202)
        at oracle.jdbc.driver.OracleCallableStatementWrapper.registerOutParameter(OracleCallableStatementWrapper.java:1356)
        at MyJava.main(MyJava.java:29)As you can see from the commented lines, I've tried several different approaches, based on various examples from Oracle documentation and various samples found on the net. My problem, I think, is that I have a fundamental disconnect somewhere. Objects? Types? Different methods? getClobVal? getStringVal? getCharacterStream? I'm still trying to get up to speed on all the lingo and terminology, and, as a result, I suspect I'm asking the wrong questions, and getting wrong results.
Based on the simple example above, my table and PL/SQL function definitions, can someone help me fill in the gaps of what I'm missing in terms of the Java code?
Thanks!
-Mark

Hi, I´ve been working on an application that return an XMLTYPE from an schema package, the XML is generated in a query, not read it in a table, and use that variable in a JSP.
The DDL of the package function is this:
CREATE OR REPLACE
PACKAGE BODY pkg_modulos
IS
    FUNCTION obtenerModulos (pAnio IN NUMBER DEFAULT 2011)
        RETURN XMLTYPE
    IS
        x    XMLTYPE;
    BEGIN
        SELECT  XMLELEMENT ("tree", XMLAttributes (0 AS "id"),
                    (SELECT  DBMS_XMLGEN.getxmltype(DBMS_XMLGEN.newcontextfromhierarchy('SELECT level,
                                          XMLElement("item",
                                                                      XMLAttributes(
                                                                m.idmodulo as "id",
                                                                m.nombre AS "text"))
                            FROM            modulos m
             WHERE m.anio = 2011
CONNECT BY   PRIOR m.idmodulo = m.padre
START WITH   m.padre IS NULL'))
                        FROM     DUAL))
                        arbolXML
          INTO  x
          FROM  DUAL;
        RETURN x;
    END;                                                                         
END;   as far as I see there shouldn´t be any problems with this code
The problem is on the JSP code
this is my code:
<?xml version="1.0" encoding="UTF-8"?>
<%@ page contentType="text/xml; charset=UTF-8" import="java.io.*,java.lang.*,java.sql.*,java.util.*,oracle.jdbc.*,oracle.xdb.*, oracle.jdbc.OracleTypes,oracle.jdbc.pool.OracleDataSource"%>
<%
  Connection dbconn;
  OracleDataSource ods = new OracleDataSource();
  OracleCallableStatement stmt;
    try
         String hostname="localhost";
         String dbname="xe";
         String usr="seguridad";
         String pass="seguridad";
         String URL = "jdbc:oracle:thin:@"+hostname+":1521:"+dbname;
         ods.setURL(URL);
        ods.setUser(usr);
        ods.setPassword(pass);
         dbconn = ods.getConnection();
          String st=request.getParameter("st").toString();
          int np=Integer.parseInt(request.getParameter("np").toString());     
          stmt = (OracleCallableStatement)dbconn.prepareCall( "begin ? := "+st+"; end;" );
          stmt.registerOutParameter(1,OracleTypes.OPAQUE,"SYS.XMLTYPE");          
          stmt.execute();
          XMLType xml = null;
          xml = (XMLType) stmt.getObject(1);
          System.out.println(xml.getStringVal());
          stmt.close();
          dbconn.close();
    catch (SQLException s)
      out.println("SQL Error: " + s.toString());
       System.out.println("SQL Error: " + s.toString());
%>I´m getting te error:
SQL Error: java.sql.SQLException: inconsistent java and sql object types: SYS.XMLTYPE
Making a debbuging I identified that the exception is been raised in this line:
xml = (XMLType) stmt.getObject(1);I´ve been checking a lot of online documentation but I´ve not been able to make it work
If anyone could help me please, I don´t know what else to do
Thanks... sorry for the english

Similar Messages

  • How to retrieve the values from PL/SQL table types.

    Hi Every one,
    I have the following procedure:
    DECLARE
    TYPE t1 IS TABLE OF emp%ROWTYPE
    INDEX BY BINARY_INTEGER;
    t t1;
    BEGIN
    SELECT *
    BULK COLLECT INTO t
    FROM emp;
    END;
    This procedure works perfectly fine to store the rows of employee in a table type. I am not able to retrieve the values from Pl/SQL table and display it using dbms_output.put_line command.
    Can anybody help me please!!!!!
    Thanks
    Ahmed.

    You mean, you can't add this
    for i in t.first..t.last loop
    dbms_output.put_line(t(i).empno||' '||t(i).ename||' '||t(i).job);
    end loop;or you can't add this
    set serveroutput onor maybe, you are working in third party application where dbms_output is not applicable at all?
    You see, not able like very similar it is not working - both are too vague...
    Best regards
    Maxim

  • Get server output from pl/sql stored procedure

    Hi Colleagues,
    I would like to get and watch the server output of my PL/SQL stored procedure
    when I run my java program and call it from. The Stored proc. uses "dbms_output.put_line".
    If it is clearly and possible (or not), will you send me your answer!
    Thanks a lot
    Ulve

    Hi,
    You can redirect the standard output to the console (i.e., the SQL output) using the
    DBMS_JAVA.SET_OUTPUT() method.
    SQL> SET SERVEROUTPUT ON
    SQL> call dbms_java.set_output (5000);But, the output is only printed when the stored procedure exits, and this setting works only for one call (i.e., the SQL call that immediately follows the invocation of DBMS_JAVA.SET_OUTPUT()). The minumum and default value is 2,000 characters and the maximum is 1,000,000 (1 million) characters. Notice the “SET SERVEROUTPUT ON” which enables displaying the outputs of stored procedures (Java or PL/SQL blocks) in SQL*Plus.
    Kuassi http://db360.blogspot.com

  • Using Java to Retrieve Images from Oracle

    OracleResultSet.getCustomDatum method is deprecated. I was using this method to retrieve an ORDImage from an Oracle 9i database. What are developers using instead of getCustomDatum to retrieve images from the database. Thanks for all help in this matter.

    Hi use getBinaryStream(java.lang.String) or getBinaryStream(int) of java.sql.ResultSet for retrieving images from database
    Hope it will be useful
    regards
    chandru

  • First Timer Need Help using Java Web Start

                        The following Error Message was thrown when I tried to launch an app
              using Java Web Start...
    An error occurred while launching/running the application.
    Title: Swing Application - Hello World
    Vendor: Ramanujam
    Category: Download Error
    Bad MIME type returned from server when accessing resource: http:\\localhost:8000\test/SimpleExample.jnlp - text/html
              My JNLP file
    <?xml version="1.0" encoding="utf-8"?>
    <!-- JNLP File for SimpleExample Application -->
    <jnlp codebase="http:\\localhost:8000\test" href="SimpleExample.jnlp">
         <information>
              <title>Swing Application - Hello World</title>
              <vendor>Ramanujam</vendor>
              <description>Test JWS</description>
              <description kind="short">Test JWS</description>
              <offline-allowed/>
         </information>
         <resources>
              <j2se version="1.4"/>
              <jar href="test.jar"/>
         </resources>
         <application-desc main-class="JWSTest"/>
    </jnlp>
                   The exception thrown :
    NLPException[category: Download Error : Exception: null : LaunchDesc: null ]
         at com.sun.javaws.cache.DownloadProtocol.doDownload(Unknown Source)
         at com.sun.javaws.cache.DownloadProtocol.isLaunchFileUpdateAvailable(Unknown Source)
         at com.sun.javaws.LaunchDownload.getUpdatedLaunchDesc(Unknown Source)
         at com.sun.javaws.Launcher.downloadResources(Unknown Source)
         at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
         at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
         at com.sun.javaws.Launcher.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:536)
    Also, How to configure MIME mapping for .jnlp files on J2EE server (I do not have another server) and if there is a need, how do i deploy the jar and the jnlp file on J2EE server?
    Kindly help.....

    Hi,
    I have the same problem, but I do have configured the webserver (Apache 2) correctly and the server is NOT returning a 404 error.
    To check this I used the a tcp monitor (Apache Axis).
    The error message in Java Webstart is identical to the one discribed above.
    In the tcp monitor I see the following :
    HTTP/1.1 200 OK
    Date: Tue, 19 Nov 2002 15:16:57 GMT
    Server: Apache/2.0.43 (Win32)
    Last-Modified: Tue, 19 Nov 2002 15:13:58 GMT
    ETag: "44eb-300-bebdba39"
    Accept-Ranges: bytes
    Content-Length: 768
    Keep-Alive: timeout=15, max=97
    Connection: Keep-Alive
    Content-Type: application/x-java-jnlp-file
    <?xml version="1.0" encoding="utf-8"?>
    <jnlp spec="1.0+" codebase="http://ns003:88/ns" href="jviews.jnlp">
    <information>
    <title>JViews TWD Demo Applicatie</title>
    <vendor>Cap Gemini Ernst & Young</vendor>
    <homepage href="default.html"/>
    </information>
    <resources>
    <j2se version="1.3"/>
    <jar href="jviewsapplet.jar"/>
    </resources>
    <application-desc main-class="JViewsClient"/>
    </jnlp>
    Any idea?
    Cheers, Joost

  • My Airport Extreme basestation used to work but upon returning from holdidays it no longer allows me to connect wirelessly through it to the internet on my iPhone, iPads, ipod touches  and my apple tv2 cannot access the network either.  Wired still works

    When I returned from holidays I could not access the internet wirelessly through my Airport Extreme (5th gen) from my iPhone, iPod touches, ipads and my AppleTV 2 no longer can access the internet or the network either.  I can get access to the internet on my iMac when wired directly into an ethernet port on the Airport Extreme.  I have tried resetting my AirPort and created new networks but still doesn't want to co-operate.  If I get wireless internet it is very, very slow and incosistent.
    Any suggestions?
    Rick

        I see now that long questions are not going to be read and answered.  Understandable.  Since writing this I got help on one aspect of question and now have Airport Extreme visible through Airport Utility and it seems to work.   However the wireless printer still does print. On the printer's screen, it recognizes my wireless network and connects. When I try to print from the MacBook, the usual printer icon comes up, but with Printer is Offline.  Printer is Not Connected.  So far, nothing in Apple or Brother help has given me answer to this problem.  Any ideas would be appreciated.

  • Using java to retrieve windows password

    Is there any way to get Java to retrieve the windows password?

    Diablo_Chiru wrote:
    how can i capture this into a string variable? can u explain it in briefLet me make a drawing for you:
    +--------------------------------------------------+
    | If it were possible to just get the password of  |
    | a Windows user account through a couple of lines |
    | of Java code, would Windows be used nowadays?    |
    +---------+-------------------------------+--------+
              |                               |
              |                               |
            +-+--+                         +--+--+
            | NO |                         | YES |
            +-+--+                         +--+--+
              |                               |
              |                               |
    +---------+--------------+          +-----+------+
    | Is Windows used at the |          | Try again! |
    | time of this writing?  |          +------------+
    +---+-------------+------+
        |             |
        |             |
      +-+--+       +--+--+
      | NO |       | YES |
      +-+--+       +--+--+
        |             |
        |             |
        |     +-------+----------------------+
        |     | Then it is safe to conclude  |
        |     | that there is no easy way to |
        |     | get the password(s)          |
        |     +------------------------------+
        |
        |
    +---+-----------------------+
    | Then why do you need this |
    | functionality if Windows  |
    | is not being used?        |
    +---------------------------+

  • Help using javas inbuilt Linked List class

    I'm trying to create a LL of ints using Javas inbuilt LL class.
    I declared it using it: LinkedList test = new LinkedList();
    Now the Java API says it takes objects, is there a way of declaring the LL so that it takes ints, or a way of adding ints to the above LL?
    Thanks

    Integer.valueOf(int) gives an Integer object that wraps the int. If you're using >= 5.0, then autoboxing will do that for you, so you can just do list.add(someInt); Note, however, that it's still an Integer object, that's being stored, not an int primitive. If you want to store primitives, you'll have to define your own class or download a third-party one.

  • Java running host command - moved from PL/SQL forums

    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE 11.1.0.6.0 Production
    TNS for HPUX: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    Hi,
    I am not familiar with Java setting in Oracle
    I have a a stored procedure that call a java program to execute host command like
    ssh user1@localhost '/home/user1/someprogram'
    if we execute this directly using PuTTY
    we can do the following with no problem
    su - oracle
    ssh user1@localhost '/home/user1/someprogram'
    but when we execute the stored procedure,
    we have to do
    */usr/bin/ssh* user1@localhost '/home/user1/someprogram'
    does anybody where to set the path or environment to make the java know the path correctly.
    thanks
    ps:. this is happen after we recently upgraded our Oracle from 9.2.0.8 to 11.1.0.6

    pgoel wrote:
    You said,
    a stored procedure that call a java program to execute host command like ssh user1@localhost '/home/user1/someprogram'SP -calls> Java Program (JP) -runs> ssh user1@localhost '/home/user1/someprogram'. is that right? I presume locahost is a database server.correct
    this is the stored procedure
    CREATE OR REPLACE PROCEDURE host_command (p_command  IN  VARCHAR2)
      AS LANGUAGE JAVA
      NAME 'Host.executeCommand (java.lang.String)';and this is the java
    create or replace and compile java source named host as
    import java.io.*;
    public class Host {
      public static void executeCommand(String command) {
        try {
          String[] finalCommand;
          if (isWindows()) {
            finalCommand = new String[4];
            // Use the appropriate path for your windows version.
            finalCommand[0] = "C:\\windows\\system32\\cmd.exe";  // Windows XP/2003
            //finalCommand[0] = "C:\\winnt\\system32\\cmd.exe";  // Windows NT/2000
            finalCommand[1] = "/y";
            finalCommand[2] = "/c";
            finalCommand[3] = command;
          else {
            finalCommand = new String[3];
            finalCommand[0] = "/bin/sh";
            finalCommand[1] = "-c";
            finalCommand[2] = command;
          final Process pr = Runtime.getRuntime().exec(finalCommand);
          pr.waitFor();
          new Thread(new Runnable(){
            public void run() {
              BufferedReader br_in = null;
              try {
                br_in = new BufferedReader(new InputStreamReader(pr.getInputStream()));
                String buff = null;
                while ((buff = br_in.readLine()) != null) {
                  System.out.println("Process out :" + buff);
                  try {Thread.sleep(100); } catch(Exception e) {}
                br_in.close();
              catch (IOException ioe) {
                System.out.println("Exception caught printing process output.");
                ioe.printStackTrace();
              finally {
                try {
                  br_in.close();
                } catch (Exception ex) {}
          }).start();
          new Thread(new Runnable(){
            public void run() {
              BufferedReader br_err = null;
              try {
                br_err = new BufferedReader(new InputStreamReader(pr.getErrorStream()));
                String buff = null;
                while ((buff = br_err.readLine()) != null) {
                  System.out.println("Process err :" + buff);
                  try {Thread.sleep(100); } catch(Exception e) {}
                br_err.close();
              catch (IOException ioe) {
                System.out.println("Exception caught printing process error.");
                ioe.printStackTrace();
              finally {
                try {
                  br_err.close();
                } catch (Exception ex) {}
          }).start();
        catch (Exception ex) {
          System.out.println(ex.getLocalizedMessage());
      public static boolean isWindows() {
        if (System.getProperty("os.name").toLowerCase().indexOf("windows") != -1)
          return true;
        else
          return false;
    Where does Java Progarm reside? On the database server filesystem OR within the Database itslef. within the Database itslef.
    Edited by: HGDBA on Mar 11, 2011 1:50 PM

  • Periodic Alert-How to send all the records returned from the SQL in a mail?

    Hello all,
    I have defined a Periodic Alert, my SQL query returns more than one record whenever I run it. I also defined an action to send an email with the message consisting of the output variables from the SQL. Whenever i run this alert, a mail is being sent for every single record returned from the query. But i want to send a single mail containing all the records information that my SQL query returns.
    For Example: My SQL query lists all the users created on current date.
    Select User_Id, User_Name into &OUTPUT1, &OUTPUT2
    from fnd_users where trunc(creation_date) = trunc(sysdate)
    Now i want to send a mail with all the users information from the above query, to SYSADMIN. How can this be achieved?
    Thanks & Regards
    chakoo

    Hi Chakoo,
    If the Periodic Alert is not working as requried. You can write a simple package with 3 procedures to implement the writing output to a out file and simultaneuosly send email to multiple receiptents.
    Example:
    Create Package xx_pac
    Create public Procedure P1
    begin
    Select User_Id, User_Name into &OUTPUT1, &OUTPUT2
    from fnd_users where trunc(creation_date) = trunc(sysdate)
    fnd_file.put_line (fnd_file.output, &OUTPUT1, &OUTPUT2);
    end;
    (Create private Procedure P2
    begin
    ---Write the email package using the UTL_SMTP approch. Using this approch you can send the procedure P1 output file as an attachment to the desiginated receiptents.
    end;
    (Create public Procedure P3
    begin
    ---call the procedure P1 using the "g_request_id = fnd_request.submit_request"
    ---Wait for the above procedure to complete using "l_conc_status := fnd_concurrent.wait_for_request" procedure.
    ---call the procedure P2. (When called you must provide the correct to, from address)
    end;
    end;
    Register the Package xx_pac as a concurrent program and schedule when submit it from the request.
    Regards
    Arun Rathod

  • How can I called java.lang.Math.sqr function from PL/SQL?

    JVM is loaded and I've queried the system table showing there are more than 9000 JAVA class objects.
    When I try something like:
    select java.lang.Math.sqrt(9) from dual;
    I get ORA-00904 (invalid column name) error. How can I invoke standard java.lang.Math methods in PL/SQL?
    tia

    You need to write a PL/SQL wrapper for the java call.
    Then you just call the PL/SQL function..
    -------PL/SQL wrapper
    FUNCTION GetFullName( code varchar2) RETURN NUMBER
    AS LANGUAGE JAVA
    NAME 'ResponseXml.GetPersonFullName(java.lang.String) return java.lang.String';
    Now you can do
    Select GetFullName( 'mycous' ) from dual;

  • How to Return From Call to Stored Procedure

    I created an SQL Query Report portlet which contains a Delete
    link next to each record. If the user clicks on the link, it
    calls a JavaScript function which confirms the Delete and then
    calls a stored procedure which deletes the record. After the
    record is deleted, I get a page with,
    "No data returned from stored procedure
    The PL/SQL gateway invoked a stored procedure as part of
    processing the URL but the procedure returned no data."
    How can I get rid of this page and just return to the page that
    contains my report portlet after the stored procedure executes?
    Fran

    Hi Michael,
    I tried the following at the end of my procedure, but I still
    got the error page instead of the page containing the report
    portlet:
    --- return to calling page
    owa_util.redirect_url('http://pmim1a:7778/servlet/page?
    pageid=55&dad=portal30&_schema=PORTAL30');
    Fran

  • Executing a shell script from pl/sql stored procedure

    Hi,
    I have Oracle 8i on HP-UX.
    I am passing a shell script name as a parameter to a user defined function from a pl/sql stored procedure. This user defined function has insterface to a user defined Java class file in Aurora java virtual machine which is written using runtime class which can execute any OS command or any shell script. I am getting any OS command run successfully, but could not run my own shell script. It's is not getting environment variables of my own, so not getting executed. So please suggest how can get these env variables in my shell script and also suggest other sucurity concerns to be taken into consideration.
    If you have any questions please let me know.
    This is really a very urgent issue.....
    Please help me.
    Thanks
    Srinivasa Rao Kolla

    Your best bet is to use the dbms_pipe builtin package to send the command to the host

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

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

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

  • Call Developer 2000 Reports/Forms from PL/SQL stored proc.

    Hello all,
    I am searching for a method for a stored procedure on Oracle 8.0 to call a Oracle Developer 2000 Report or Form.
    Any suggestions,
    Thanks,
    Julian

    No offense,
    Do you mean calling a trigger in a Form or Report to fire off another of the same? Or do you mean how do I fire Forms from a Database stored procedure?
    Please I don't mean any offense, it is just hard, sometimes to say simple concepts and not sound, well, bad.
    Otherwise think about it. A Stored procedure is run inside the database, it has no idea where you client is, and doesn't know which type of client you have (X-Windows, Microsuck), and doesn't know how to fire off an app on the client.
    One concept that is hard, sometimes, to get is where things are run. Forms runs on an Apps Server (Java screens), or a client, like on a PC. Stored procedures run, usually, on a whole different box, a database server. The database server is not that well connected that it can fire off a app on a client. Try to go to a Unix database server and run a command to fire off Internet Explorer on your client!? Not real easy to do.

Maybe you are looking for

  • When I plug in my iPhone to charge on my iMac, on iTunes, my iPhone doesn't come up!

    please help with this problem. i've already had 6 problems in the past 1-2 months. i really need this fixed BILL

  • How to enable diagnostics in cloud services and virtual machine

    Hi All, I need to enable diagnostics  for cloud services and virtual machine in our cloud environment. I referred the below link. https://convective.wordpress.com/2014/06/27/using-azure-monitoring-services-api-with-azure-cloud-services/ Installed azu

  • Develop settings problem

    After I imported a photo on lightroom I go in develop and the problem is that i see the settings are NOT the same as shot in raw. Indeed the contrast the brightness and also the temperature and the color's tone are always the same. Also if i choose t

  • Ace probe failure after IIS app pool recycle?

    Windows Server 2003 SP2 ACE Module A2(1.6a) I suspect this is caused by an IIS6 setting, but posting here in case anyone has seen this.  For this one particular site, we have 4 servers in the farm.  2 of those servers are fine.  The other 2 (new) ser

  • Completion Date for SLA

    Hi All, Iam working on SLA. I have configured the SLA to my knowledge. The problem now it the comopletion date is not getting calculated for the tickets that is created. Where exactly is the configuration that i have to for the compeltion date and ti