The troubles with creating SQL function in Java

Hi!
I use Oracle 10g and connect to it from Java application. I need in creating SQL functions from Java code.
In Java I have:
Statement stm = null; try{     stm = dbConnection.createStatement();     stm.executeUpdate( query ); }catch(SQLException ex){     throw ex; }finally{     try{ stm.close(); }catch(Exception ex){ stm.close(); } }
And I'm passing the next SQL function:
create or replace function get_me return number is
result number;
begin
select 5 into result from dual;
return result;
end;
This code is run successful, but I can't call this funtion, because it has status Invalid
I'm looked the next error: PLS-00103: Encountered the symbol "" when expecting one of the following: . @ % ; is authid as cluster order using external character deterministic parallel_enable pipelined aggregate
But I don't understand, What the matter? From Oracle Enterprise Manager I can create this function without problems. So, I wrote the wong Java code. Also, I can't find my error :(
May be, do u have the some ideas?
Thank you very much!

Post the whole pl/sql code please.
To run PL/SQL from within java you'll need callablestatement.
[here |http://www.idevelopment.info/data/Programming/java/jdbc/PLSQL_and_JDBC/CallPLSQLFunc.java] an example : http://www.idevelopment.info/data/Programming/java/jdbc/PLSQL_and_JDBC/CallPLSQLFunc.java

Similar Messages

  • Interactive Report with PL/SQL Function Source

    Is it possible to create interactive report with PL/SQL function source returing a query? If not, has anyone done any work to simulate the interactive reporting feature for a normal report using API?

    I haven't tried that before but you could:
    1. create a collection from your result set returned by a dynamic query,
    2. create a view on that collection,
    3. use the view in your interactive report.
    The usability of this proposal depends from a question how "dynamic" your query is - does it always have the same number of columns or not.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Error PLS-00306 during calling PL/SQL function from Java

    Hi all,
    I am facing a problem during call of oracle PL/SQL function from java using CallableStatement.
    I receive following error message.
    java.sql.SQLException: ORA-06550: line 1, column 13:
    PLS-00306: wrong number or types of arguments in call to 'EXPORT_HIST_ALARMS_FUNC'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    As per above error EXPORT_HIST_ALARMS_FUNC in oracle has this signature.
    CREATE OR REPLACE FUNCTION EXPORT_HIST_ALARMS_FUNC(startDateTime VARCHAR2, endDateTime VARCHAR2, meType VARCHAR2) RETURN VARCHAR2 IS
    END EXPORT_HIST_ALARMS_FUNC;
    Above function I have called following way in java.
    String sql = "begin ?:= EXPORT_HIST_ALARMS_FUNC(?, ?, ?); end;" ;
    CallableStatement cStatement = null;
    cStatement = connection.prepareCall(sql);
    cStatement.registerOutParameter(1,Types.VARCHAR);
    cStatement.setString(2,startDateTime);
    cStatement.setString(3,endDateTime);
    cStatement.setString(4,meType);
    cStatement.execute();
    msg = cStatement.getString(1);
    Actually above function requires three input parameters and one return parameter.
    During execution of above java code it throws SQLException and shows PLS-00306: wrong number or types of arguments in call to 'EXPORT_HIST_ALARMS_FUNC' error.
    I have run this function directly from oracle with three parameters and run successfully and finally it returns string.
    But I am unable to figure out why it doesn't run from above java code.
    Please help regarding this.
    Thanks.
    Regards,
    Shardul Banker

    Try this:
    String sql = "begin ?:= EXPORT_HIST_ALARMS_FUNC(?, ?, ?); end;" ;
    CallableStatement cStatement = null;
    cStatement = connection.prepareCall(sql);
    cStatement.registerOutParameter(1,Types.VARCHAR);
    cStatement.setString(1,startDateTime);
    cStatement.setString(2,endDateTime);
    cStatement.setString(3,meType);
    cStatement.execute();
    msg = cStatement.getString(1);Regards,
    Martijn Teigeler
    Edited by: mTeigeler on Oct 13, 2007 10:22 AM

  • The trouble with 'expression' -- how to edit that

    I just walked to the corner bodega ( even though its korean sooo bodega is misleading ).. to get some beer...
    ITS BEER THIRTY -- yipee !
    and on way back down the block where I live ( which is suburban ) some boy kid on a bike was riding and playing with a girl kid ( probably was his slightly older sister - these kids probably around 12 years old ) in front of a rental property with some spanish americans hanging out in their cemented yard on hammocks near bar b q...with their own kids...(they have planted another hopeful "veg garden" around the perimeter of their so called yard...tomato plants etc )...so anyway, the picture here is a "neighborhood" of sorts with a somewhat lower middle class family atmosphere in a fairly lower class area on the verge of becoming middle class ( with God's help ).
    And anyway, I passed by the boy kid on the bike and smiled at him cause he seemed to be a decent kid having fun with his friend ( they were sorta laughing about something and having fun before I showed up as the big "adult" and looked at me ). His smile back was like sunshine and true and he immediately recognized he could keep having fun with his friend and I wasn't a "threat" , but instead some sorta "neighbor".  She did the same more or less ( I think she had some devious design re: the game they were playing ... like " OK, you think you're so great on that bike, try to CHASE me ! " or something like that....kid stuff... and fun thank God.  This neighborhood has it's share of bad things going on in the streets at times.  And that leads to my focus on " The trouble with expression".
    A lot of people, like me for example, can't express themselves well in some ways. I didn't say , " Hi there kids !  What's new ? " when I met them on the way back from the bodega.  I didn't stop and ask what the heck they were laughing about.  Nor did I speak to the spanish people adjacent to the kids ...in their "yard" ...with the bar b q and hammock and obvious friday afternoon socializing they were into....
    We in nyc area are typically a mixed bag of races... I'm white, kids were african amer ( black but more like brownish if you ask me ), spanish people like mexicans IMO... who cares.  This is suburbia so you can imagine how more mixed it is in the city.
    Anyway, the reason I don't express myself so well in situations like that ( spontaneously on the street ) is cause I used to stutter real bad as a kid.. couldnt talk... so I clamed up. All my life I've been fighting that disability ( and other "challenges" re: learning, reading , writing, asthma , etc ) in terms of the "repercusions".  Kids like me make fun of me cause I stutter...I can't fight back verbally and lash out physically... become a "maniac".  Get kicked out of city schools etc...  Trouble maker.  Can't express myself, fight back with words....when kids are mean to me. After a while they dont matter much as if they are mean I just keep quiet and keep mouth shut and start "thinking" instead... how to keep on top of this person and not let things get crazy... meet the challenge.
    Turns out I'm not stupid and at some point my being " quiet" becomes a positive thing.. peers start asking my advice.. I'm suddenly a " deep thinker" in their eyes.  I go from being disabled ( stupid ) to being " a deep thinker" about the age of puberty... when nobody knows what they are doing anymore.
    I start thinking about expressing myself some other way than talking.. like maybe draw pictures... paint stuff, do things to have fun with people that doesnt put me in the " limelight".. where I have to talk etc.  More success follows this tendency to socialize and express myself... and I discover that chics like the strong silent type.
    ( I have been into gymnastics thru my fathers infactuation with it since age 2 -- which I think eventually ( inadvertantly ) " cured me " of many of my learning disabilities etc --  (talk to an OT about this and modern child development stuff to know what I mean here )
    Meanwhile I am very fond of dogs as my family has dogs one after the other and I am one of their best friends. I find I can communicate with dogs better than I can communicate with people sometimes.  This seems to be a problem in some cases with some people, but for me it never got crazy... where I " loved dogs " more than I " love people ".  I have never loved any dog more than any person and shudder when I think of those who do.  Those people who do have more problems than I ever had to deal with.
    And now, after all these years ( I am now 60 ), working on movies and tv stuff etc as a crew person with some college fine art schooling ( eventual photo major ) to get me started, I got into this " editing " stuff... A program I can actually " use " on my mousey computer introduces me to a more " final product " than I ever had access to before.
    BUT I don't shoot motion pic stuff, cant afford that - and never could before basically, and now I think about the triple threats and future of movies and tv as a business... as well as the tools ( in this case the editing programs in conjunction with the cameras ( arri, panavision etc ) ) and the desire to express something ...
    This has to be ( if you want an audience ) ... " tell a story ".  You could just put a camera on a rocket ( strap it to the rocket ) and shoot the takeoff etc and show that.. but you need a V.O. saying " well, I just shot off a rocket and this is what it looked like"...to bring the experience to the audience... or else IMO there is no story.
    Which leads to what's going on now in the world of reality tv, episodic tv , some big movies, etc.  Telling a story is more than showing you stuff that you just wouldnt have seen if you hadn't been there yourself. Telling a story is more like saying something that bridges the gap between your own experience of life and its challenges ( of being part of your neighborhood and making sense of your own childhood and being an adult now maybe ).. and what others also have gone through to get to the same conclusions....
    This is the object of " expression" IMO, whether you can talk about it, draw pictures about it, or make music about it...
    And the editing program is a tool to help do that.. it is not the end all or purpose of life or the " personal crusade" in the long run.
    It's one reason scary snakes often shock people out of their desire for comfort and predictable living... makes you think about that one serpent in the garden of eden you create for yourself .... and IMO who cares what editing program you use to write that and shoot it ??

    Steve Grisetti, the MOD of the Premiere Elements forum and co-founder of a video/photo/editing Web site, Muvipix, did a nice article, "Don't just make a movie - tell a story." His audience was more consumer video editors, than the folk that we see around here, but his points were well-made, and were embraced by many in the Muvipix community.
    I think that too many, forget that concept - and I am talking Hollywood and NYC here. It's almost as if, when the story breaks down, they instinctively know to throw in a car chase, or big explosion.
    I know that I cite it too often around The Lounge, but that was what I enjoyed most about the LOR trilogy. It told a story. Now, though I had some exposure to the story, when much younger, I have to admit that I never read Tolkien, though almost everyone, that I knew, was busy with every book. Still, I only knew some of the high points, and not much more. However, almost immediately, I was drawn into the story, and only wished that I did not have to wait so long between episodes. The FX were cool, and I am a technoid sort, but it was the story that hooked me. I had read several articles on the FX production, so WAS looking for some of that, but what I wanted was the story. This is one that I will buy the BD "Director's Cut" of, and do a marathon. I have seen each segment, maybe three times, but never back to back to back. I still need to fill in a few blanks, and an entire day of viewing should do that - no phone, no visitors, nothing but LOR.
    As far as human communications, I can talk, even more than I write here, but only concerning things that I care about. I am horrible at "small talk," and would rather addrss an auditorium of 10,000, on something that matters to me, than talk about the weather to a single person at a fund raiser. Not that long ago, I was seated next to a potential donor at a charity dinner. I was rather dreading it, and when she mentioned that she did not drink (what, no wine?), I was worried. At some point, early in the evening, the subject turned to politics. Now, I usually am very quiet on my feelings, as they are not exaclty politically correct, and worry about hurting feelings, or making a scene. I fielded a question on Senatorial candidates, and just decided to answer from my heart. Her eyes lit up, and I did not notice that the event had ended. Her husband was standing, as was my wife, and we were talking politics, talk-radio, FoxNews, Senator John Kyl, Will Rogers and much more. I found that we were kindred spirits. Finally, our spouses pulled us apart, and we departed. We continued that conversation at 2 - 3 more events during "the season." One day, my wife informed me that she had just given $10M to the foundation - the largest single gift ever. At least she wasn't a screaming liberal, as I would surely have really messed up the deal... However, had it all been small talk, I would have found a reason to excuse myself and hide in the bar for a few hours.
    Also, the way that our society has developed, I will smile, nod, and say "hello" to strangers on the street, but always leave it at that. I am sure that many walk past and think "he wasn't all that friendly." They are probably right, but at least I was pleasant to them and did not rob them! Heck, I will usually tell telemarketers, "No, but thank you for your generous offer on that time-share... "
    Hunt

  • Calling a PL/SQL function from java

    I would like to call a pl/sql function from java. My pl/sql function is taking arrays of records as parameters. How do i proceed? Which specific oracle packages do I have to import?
    Please send an example.
    TIA,
    Darko Guberina

    Documentation here: http://download-uk.oracle.com/docs/cd/B14117_01/java.101/b10983/datamap.htm#sthref185
    says JPublisher can publish records too.
    But when I change the example given at http://download-uk.oracle.com/docs/cd/B14117_01/java.101/b10983/datamap.htm#sthref190 as following:
    PACKAGE "COMPANY" AS
    type emp_rec is record (empno number, ename varchar2(10));
    type emp_list is varray(5) of emp_rec;
    type factory is record (
    name varchar(10),
    emps emp_list
    function get_factory(p_name varchar) return factory;
    END;
    then I see <unknown type or type not found> at sql or java files generated. Any ideas?

  • What is the need of creating partner functions for sales document type.

    Hi SAP (SD-GURUS),
    Actually we create partner functions  before creating customer ex: sold to party, ship to party, bill to party, and payer.
    These partner functions are going to be copied into sales order while processing sales order.
    Again what is the need of creating partner functions for sales document type.
    Thanks&Regards
    sreenivas peruru

    There are some Partners you could enter at Sales ORder Level. E.g. Sales Person, Employee Responsible, Forwarding Agent, Broker, etc.
    Thus these partner Determination need to be carried out at Sales Order Level & not at Customer Master level.
    So we have to configure partner Determination for various levels e.g. Customer Master, Sales Order, Delivery level etc...
    Hope this helps...
    THanks,
    Jignesh Mehta

  • Trouble with a bindVar function in the reflection

    Hello everybody!
    I have some trouble with using FXObjectValue.bindVar(...) function.
    I'm getting
    java.lang.UnsupportedOperationException: unimplemented: bindVar
    exceprion :(
    I loked up to source code of JavaFX and I can't find implementation this function, except one that throws this exception.
    Hence I have two questions:
    - Is this function implemented wherever really?
    - If one isn't implemented how can I conquer this trouble or will one be implemented soon?
    //Best regards
    //Alexander

    Hi again!
    I have looked at this classes which you have advised me. Thank you very much!
    But I can't understand what I have to do in the onChange method, when I realise FXChangeListener interface. Any values aren't passed into this method.
    I have tried look up any explanation into source code of the JavaFX compilator, but I haven't found.
    I have some ideas about some solution for this case:
    to save source and destination objects into a class that realises this interface.
    But I don't sure that solution is clear.
    Could you please estimate this idea?
    My be are some other solutions of this problem?
    Thank you in advance!

  • Issue with Oracle.sql.NUMBER in Java Stored Procedure

    When we try to make a call to the Oracle.sql.NUMBER(String) inside a java stored procedure and pass values from '01' to '09', it throws java.lang.StringIndexOutOfBoundsException: String index out of range: 3
    We use Oracle 9.2.0.6 - JServer Release 9.2.0.6.0.
    It works fine for other values. Please find below the code used for simulating the issue outside the application. Thanks.
    create or replace and compile java source named testNumber as
    import oracle.sql.NUMBER;
    import java.sql.SQLException;
    public class TestNumber
           public static String convertNumber(String parm) {
                     NUMBER nTest;
                     try {
                             nTest = new NUMBER(parm);
                             return "TRUE";
                     }catch (SQLException sqle) {
                             return "FALSE";
    create or replace function test_number (p_str in varchar2) return varchar2 as
    language Java name 'TestNumber.convertNumber(java.lang.String) return
    java.lang.String';
    select test_number('05') from dual;  - Throws exception ORA-29532: Java call terminated by uncaught Java exception: java.lang.StringIndexOutOfBoundsException: String index out of range: 3
    select test_number('5') from dual; - Works fine
    select test_number('010') from dual; - Works fine

    Siva,
    I'm only guessing, but it could be an Oracle bug, in which case I suggest checking with Oracle Support.
    (You do have a support contract, don't you? ;-)
    Did you try compiling and running your java class "TestNumber" outside the database?
    Class "oracle.sql.NUMBER" should be in Oracle's JDBC driver, I believe.
    Good Luck,
    Avi.

  • Populating item with pl/sql function body

    Hi,
    I want to populate a "Display as text (saves state)" item with the difference of 2 other items.
    The source of my item is:
    - Only when current...
    - PL/SQL Function body
    - Source expression:
    DECLARE
    v_diff NUMBER;
    BEGIN
    v_diff := :P1_AUFWAND_TOTAL - :P1_AUFWAND_BERECHNET;
    return v_diff;
    END;
    Now I get this error:
    ORA-06502: PL/SQL: numerischer oder Wertefehler: Fehler beim Konvertieren von Zeichen zu Zahl
         Error      ERR-1904 Unable to compute item default: type = Function Body...
    I tried to track down the problem with to_number conversion:
    v_diff := to_number(':P1_AUFWAND_BERECHNET'); or
    v_diff := to_number(':P1_AUFWAND_BERECHNET', '999G999D00');
    What's wrong here? It feels like I'm making a simple mistake...
    Thanks for any help,
    Roger

    Hi Denes,
    Thanks for your help. You were right, item :p1_aufwand_berechnet was not a number.
    I created the problem myself by setting the format to:
    return TO_CHAR(v_aufwand,'999G999G999G999G990D00');
    Now the dilemma is that I want to calculate the numbers, but at the end I want a nice format to display them. This obviously only works with TO_CHAR, see:
    Re: Number format mask of text item is not applied
    Maybe this is to be solved with a seperate process after the calculation, to set the format?
    Cheers,
    Roger

  • Having trouble with creating objects from instances created with ClassLoade

    Hi.
    I'm having a bit of trouble with casting an instance of an object from a custom ClassLoader. Don't worry - the code isn't for anything sinister - it's for one of those life simulation thingies, but I want to make it modular so people can write their own 'viruses' which compete for survival. You know the score.
    Anyway. I've got the beginnings of my main class, which seems to load the class data for all 'virus' classes in a folder called 'strains'. There is a abstract class called AbstractVirus which declares the method calls for how the viruses should behave and to get textual descriptions, etc. AbstractVirus is to be subclassed to create working virus classes and these are what my main class is trying to load instances of.
    Unfortuantely, I can't cast the instances into AbstractVirus objects. The error I've been getting is 'ClassCastException' which I presume is something to do with the fact that my ClassLoader and the Bootstrap ClassLoader aren't seeing eye-to-eye with the class types. Can anyone help? This line of programming is really new to me.
    My code for the main class is below:
    /* LifeSim.java */
    public class LifeSim {
      public LifeSim() {
        /* Get a list of all classes in the 'strains' directory and store non-
         * abstract classes in an array. */
        Class virusClasses[] = null;
        try {
          /* Get a reference to the file folder 'strains' and make sure I can read
           * from it. */
          java.io.File modulesFolder = new java.io.File("strains");
          if (!modulesFolder.isDirectory() || !modulesFolder.canRead()) {
         System.out.println("Failed to find accessible 'strains' folder");
         System.exit(-1);
          /* Get a list of all the class files in the folder. */
          String virusFiles[] = modulesFolder.list(new ClassFileFilter());
          if (virusFiles.length == 0) {
         System.out.println("No virus strains in 'strains' folder");
         System.exit(-1);
          /* Create an array of class objects to store my Virus classes. Ignore the
           * abstract class as I cannot instantiate objects directly from it.*/
          virusClasses = new Class[virusFiles.length];
          VirusClassLoader classLoader = new VirusClassLoader();
          int j = 0;
          for (int i = 0; i < virusFiles.length; i++) {
         String virusName = "strains/" + virusFiles;
         Class tempClass = classLoader.loadClass(virusName);
         if (tempClass.getName().compareToIgnoreCase("strains.AbstractVirus") != 0) {
         virusClasses[j++] = tempClass;
    } catch (ClassNotFoundException ncfe) {
    System.out.println("Failed to access virus class files.");
    ncfe.printStackTrace();
    System.exit(-1);
    /* TEST CODE: Create an instance of the first virus and print its class
    * name and print details taken from methods defined in the AbstractVirus
    * class. */
    if (virusClasses.length > 0) {
    try {
         // Print the class name
         System.out.println(virusClasses[0].getName());
         Object o = virusClasses[0].newInstance();
         strains.AbstractVirus av = (strains.AbstractVirus) o;
         // Print the virus name and it's description
         System.out.println(av.getQualifiedName());
         System.out.println(av.getDescription());
    } catch (InstantiationException ie) { ie.printStackTrace(); }
         catch (IllegalAccessException iae) { iae.printStackTrace(); }
    public static void main(String args[]) {
    new LifeSim();
    class ClassFileFilter implements java.io.FilenameFilter {
    public boolean accept(java.io.File fileFolder, String fileName) {
    if (_fileName.indexOf(".class") > 0) return true;
    return false;
    class VirusClassLoader extends ClassLoader {
    private String legalClassName = null;
    public VirusClassLoader() {
    super(VirusClassLoader.class.getClassLoader());
    public byte[] findClassData(String filename) {
    try {
    java.io.File sourcefile = new java.io.File(filename);
    legalClassName = "strains." + sourcefile.getName().substring(0,sourcefile.getName().indexOf("."));
    java.io.FileInputStream fis = new java.io.FileInputStream(sourcefile);
    byte classbytes[] = new byte[fis.available()];
    fis.read(classbytes);
    fis.close();
    return classbytes;
    } catch (java.io.IOException ioex) {
    return null;
    public Class findClass(String classname) throws ClassNotFoundException {
    byte classbytes[] = findClassData(classname);
    if (classbytes == null) throw new ClassNotFoundException();
    else {
    return defineClass(legalClassName, classbytes, 0, classbytes.length);
    Thank you in advance
    Morgan

    Two things:
    I think your custom ClassLoader isn't delegating. In general a ClassLoader should begin by asking it's parent ClassLoader to get a class, and only if the parent loader fails get it itself. AFAIKS you could do what you're trying to do more easilly with URLClassLoader.
    Second, beware that a java source file can, and often does, generate more than one class file. Ignore any class files whose names contain a $ character. It's possible you are loading an internal class which doesn't extend your abstract class.

  • Create RFC Function using Java Program

    hi
    I am trying to create a small utility in java that extracts data from SAP system and loads it to local Db
    For extracting data from SAP we have a custom ABAP function (RFC) running on SAP server that is called from Java using JCO3 APIs
    Installation of this utility on client side involves -
    1.     Installing RFC on Clientu2019s SAP instance
    2.     Installing / Configuring Java code on Clientu2019s machine
    Is there a way to install / create a RFC function using java -JCO APIs so that Step-1 can be omitted?
    I had browsed through a sample provided in examples installed with JCO3 but its very trivial example can someone point to a exhaustive link or explain how this can be achieved using Java program
    Thanks

    Hi Amit
    I am not sure I understand the question. You want to create an RFC in Java? If this is correct why not create a Remote Method in java for example as EJB or Web Service which is more standard than creating an RFC.
    On the other hand if you want to create a RFC client in Java (a Program which calls a RFC in SAP ABAP system) you can use JCo APIs (which can be either standalone or on the NW Java server) or JRA (from NW 7.1 onwards).
    Regards
    Partha

  • Can we call sql function  in java

    as i know i can call stored procedures ,but can i call pl/sql functions.

    Using JDBC you can execute any valid sql statement.
    For a pl/sql function you use a CallableStatement and the syntax:
    {?= call <procedure-name>[<arg1>,<arg2>, ...]}
    http://java.sun.com/j2se/1.5.0/docs/api/java/sql/CallableStatement.html

  • Problem with PL/SQL Function Body

    Hi,
    I'm getting the following error, when i run the report.
    I'm trying to fetch a year value from a table based on a parameter value ":P33_YEAR"
    ORA-01403: no data found
    Error ERR-1904 Unable to compute item default: type = Function Body computation_type= DECLARE FY VARCHAR2(6); BEGIN SELECT DISTINCT YEAR1 INTO FY FROM REP WHERE YEAR = TRIM(:P33_YEAR);
    RETURN FY; END;.
    I have written this code in a PL/SQL Function Body for a Hidden item.
    Please let me know whats wrong with this code?
    Thanks
    CK
    Message was edited by:
    user536304

    Your code is in a default value for an item, right?
    You need to make sure :P33_YEAR is not null and handle the error in the PL/SQL if it is.
    How is P33_YEAR populated? do you pass it in? check to see if it is making it there..
    Message was edited by:
    Bill Carlisle

  • Read consistency in query with pl/sql functions

    Not sure if this is a bug or feature, but a query containing a user-defined pl/sql function does not include tables accessed within the pl/sql function in the read consistent view of data, eg
    select myfunc from tableA
    myfunc is a stored function that queries tableB and returns a value
    If a change to tableB is committed in another session during fetch phase of select statement, then fetched rows reflect the changes. The database does not recognise tables accessed in the plsql function as being part of the query.
    This happens in 7.3.4 and 8.1.6. Don't have 9i so can't tell.
    Anyone know if this is a bug or feature?
    Aside: you can also drop the plsql function whilst the fetch is running. It will kill the fetch. No DDL lock taken on the plsql function whilst select is running! Seems wrong.

    I don't know Forms but I know SQL*Plus and Oracle database. Normally PL/SQL running on the database can only access files on the host where the database instance is running even if you start PL/SQL with a SQL*Plus connection from another host.
    PL/SQL runs only the database instance not on the client side even if you start the PL/SQL code from a remote connection with SQL*Plus.

  • Conditional display of region with PL/SQL function returning SQL query

    Hello,
    ApEx 2.0.
    I use PL/SQL functions that return SQL queries to display the contents of a region.
    How could I conditionally display such region ? If no data is found, the region shouldn't be shown. I tried with "SQL query returns at least one row" but this doesn't seem to work.
    Thanks,
    Matthias

    Hi Matthias,
    Are the regions in question report regions? So your PL/SQL process is returning a SQL query and then populating a report?
    The EXISTS(SQL Query returns at least one row) condition should work, try running the query you are using in the Expression 1 textarea inside SQL*Plus, or SQL developer using the same parameters, and see what gets returned.
    If you are still stuck, can you post the query you are using inside your Expression 1 textarea of the Conditions section and I can take a look at it for you.
    Hope this helps,
    Cj

Maybe you are looking for

  • Unable to create Listener in Repository

    I am doing a base install of CG 5.4 onto a Windows 7 box.  The install goes fine and I shutdown/startup CQ5.  Upon CQ5 server startup, I see the following stacktrace: 09.04.2012 15:58:45 *ERROR* RepositoryStartupServlet: RepositoryStartupServlet init

  • Processing xml in abap mapping

    Hi all, I use abap mapping to create XML from Idoc, I use if_ixml interface to do it. In my code I use method get_elements_by_tag_name (on object if_ixml_document) to find all elements with the same name: I checked my mapping in  SXI_MAPPING_TEST and

  • Crystal 2008 with BDS 2006

    Post Author: DiegoBrazil CA Forum: Other Hi.... nowaday we are using CRPE32.dll to integrate Delphi with Crystal 8.5. But, we are having problems with RTF format (problems with Special Characters). We are migrating Crystal 8.5 to Crystal 2008, but we

  • My friend signed into gmail on my iPad safari browser and it kept asking him if he wanted to increase storage capacity size.

    My friend signed into their gmail account on my iPad and asked if he would like to increase storage capacity. He clicked no but then it signed him out. I know this happened once before but he was still able to sign into gmail. He tried again but it s

  • SAP HCM jobs for freshers

    Hello, I am Jisul. I was working as an HR generalist for past 6  years with a reputed company. I had to leave my job due to personal reasons in April, 2014. In the meantime, I decided to go for SAP HCM certification as I thought it would be an extens