Plsql objects in timesten

Hi,
may be question is obvious,but is it possible to create plsql objects (procedure, packages/bodies) in timesten database?
Message was edited by:
`mo

Hi 'mo,
Support for PL/SQL stored procedures is not available in TimesTen 7.0. This functionality is in plan for a future product release.
Susan

Similar Messages

  • How to execute a function in oracle plsql object, when object dies

    I have a plsql object with a member function as exec_last.
    I want this procedure to be called when plsql object is cleaned or when the session hosting this object dies.
    In C, we have a system call as atexit(). Is there any such feature in Oracle 10g or any workaround using embedded java.
    This feature is required to flush the contents stored in plsql table in the object to the database, when program exits.
    Thank you,
    Warm Regards,
    Navin Srivastava

    navsriva wrote:
    Is there any better way to implement this in memory caching. What is the buffer cache of Oracle? It is exactly that - a memory cache for data blocks. Both new blocks (created by inserting new rows) and existing blocks (used by selects, updates and deletes, and re-used (freespace) by inserts).
    The Oracle buffer cache is a very mature and sophisticated cache. Attempting to do it "+better+" than the db buffer cache in another software layer (like PL/SQL) is mostly a waste of time and resources.. and invariable introduces another s/w layer that simply increases the number of moving parts. This in turn usually means increased complexity and slower performance.
    Why use bulk processing in PL/SQL? The basic and fundamental answer to that is to decrease the context switching between the PL engine and SQL engine.
    When running PL code to insert data into SQL, that data needs to be passed to the SQL engine, the PL engine needs to perform a context switch to the SQL engine to allow it to process that data and perform the SQL instruction.
    If there are a 1000 rows to inserts, it means a 1000 context switches.
    Bulk processing makes the "+communication/data pipe+" between the two bigger. Instead of passing a single row's data to the SQL engine via a context switch, a bulk collection/array of a 100 rows is passed. There is now a mere 10 context switches required to push that 1000 rows from the PL engine to the SQL engine.
    You can do the same from any other SQL client... (remember, that PL itself is also a SQL client). You can, using C/C++ for example, do the exact same thing. When passing row data to the SQL engine to insert, pass a collection of a 100 rows instead of the data for a single row.
    The exact same benefits result as in PL/SQL. A bigger communication pipe, allowing more data to be transferred to/from the SQL engine, resulting in less context switching.
    Of course, a context switch ito C/C++ is a lot more expensive than in PL/SQL - as the PL engine sits in the very same physical process as the SQL engine. Using C/C++, this will usually be a separate process communicating with the SQL engine process across the network.
    The same applies to other languages, like Java, C#, Delphi, Visual Basic and so on.
    It does not make sense to introduce another s/w layer, the PL/SQL engine, and have the client "+insert+" rows into its memory structures... and then use the PL engine to "+flush"+ that to the SQL engine via a bulk process command.
    It will be faster, and more scalable, having the client language using bulk processing directly and dealing with the SQL engine directly.
    Simple example. What does the SQL*Loader program (written in C) use? It does not use PL as a proxy for moving data from a CSV file into a SQL table. It calls SQL directly. It uses bulk processing. It is very fast at loading data.
    There is an exception to this. When PL is used as a business processing and validation layer. Instead of the client code implementing that logic, it is done using PL. The client then no longer will manually add an invoice to the INVOICES table for example. It instead calls the AddNewInvoice PL/SQL procedure - and this procedure does all. It checks the customer code as valid. Ensures that there's stock available of the products being ordered on the invoice. Etc.
    But in this scenario, PL is not used a secondhand "buffer cache". It is used for what it has been designed for - a proper application layer inside the database.

  • Auditing on PLSQL Objects

    This is on 10g R2.
    How can I derive auditing information from sys.aud$ specifically for PLSQL objects (function, stored procs, packages)
    In other words, what are columns or values in rows in sys.aud$ table, that gives this information.
    Thanks
    R

    SQL> desc aud$
    Name                            Null?    Type
    SESSIONID                       NOT NULL NUMBER
    ENTRYID                       NOT NULL NUMBER
    STATEMENT                       NOT NULL NUMBER
    TIMESTAMP#                             DATE
    USERID                              VARCHAR2(30)
    USERHOST                             VARCHAR2(128)
    TERMINAL                             VARCHAR2(255)
    ACTION#                       NOT NULL NUMBER
    RETURNCODE                       NOT NULL NUMBER
    OBJ$CREATOR                             VARCHAR2(30)
    OBJ$NAME                             VARCHAR2(128)
    AUTH$PRIVILEGES                        VARCHAR2(16)
    AUTH$GRANTEE                             VARCHAR2(30)
    NEW$OWNER                             VARCHAR2(30)
    NEW$NAME                             VARCHAR2(128)
    SES$ACTIONS                             VARCHAR2(19)
    SES$TID                             NUMBER
    LOGOFF$LREAD                             NUMBER
    LOGOFF$PREAD                             NUMBER
    LOGOFF$LWRITE                             NUMBER
    LOGOFF$DEAD                             NUMBER
    LOGOFF$TIME                             DATE
    COMMENT$TEXT                             VARCHAR2(4000)
    CLIENTID                             VARCHAR2(64)
    SPARE1                              VARCHAR2(255)
    SPARE2                              NUMBER
    OBJ$LABEL                             RAW(255)
    SES$LABEL                             RAW(255)
    PRIV$USED                             NUMBER
    SESSIONCPU                             NUMBER
    NTIMESTAMP#                             TIMESTAMP(6)
    PROXY$SID                             NUMBER
    USER$GUID                             VARCHAR2(32)
    INSTANCE#                             NUMBER
    PROCESS#                             VARCHAR2(16)
    XID                                  RAW(8)
    AUDITID                             VARCHAR2(64)
    SCN                                  NUMBER
    DBID                                  NUMBER
    SQLBIND                             CLOB
    SQLTEXT                             CLOB
    OBJ$EDITION                             VARCHAR2(30)

  • Determing plsql object type

    I have a plsql object which is a subclass of a super class. How do I exactly determine the instance of the object?

    SYS_TYPEID function can be used in a query to return the typeid of the most specific type of the object instance passed to the function as an argument.
    See how to get the text name of an object's type:
    http://www.toadworld.com/Knowledge/DatabaseKnowledge/DatabaseTips/OracleTips/tabid/311/Default.aspx
    categories "PL/SQL 2006": "How to get the text name of an object's type"
    Regards,
    Zlatko

  • Listing out the plsql objects which update tables

    1) Is there a way i can list out which plsql object is doing DML statement on a table, i know we can use USER_DEPENDENCIES or DBA_DEPENDENCIES tables but it is listing out the packages or procedures even if a column is used to define a ref datatype or even if the code is commented out, i just want to see only the objects that are issuing DML statements.
    2) Is it possible to see at column level details, meaning if a column is updated in one procedure and another column is updated in another procedure, can i list out the procedures and the columns that would be updated or inserted in that procedure.
    appreciate your help, Thank you.

    Do a join of dba_dependencies and dba_hist_sql_plan/v$sql_plan
    thanks
    http://swervedba.wordpress.com/

  • Converting from JAVA HASHMAP to PLSQL object or CLOB

    Hello All,
    My oracle version in 10.2.0.4 on a solaris V880 machine.
    Our Application Java SDK is 1.4.
    I am trying to pass in a series of XML (considerably huge for XML type column) from java application plsql which stores them into an oracle table with column as external BLOB. Since the contents are so heavy for each objects , using XMLTYPE column is not feasible.
    The xml files comes as either java hash_map or string which i have to pass as parameter to an Oracle stored procedure which stores as external BLOB in OS through a table.
    My first doubt is this the correct approach.
    My second doubt here is how to interpret java hash_map object within PLSQL when it is passed to it.
    Apologies if the question is silly since i am a new comer to java.
    Thanks in advance ,
    Vijay G

    vijay S P G wrote:
    If i have plsql collection with a varchar2 and a blob as record type then can i directly pass the java hash map to the procedure having parameter datatype as the above said record type ?Of course not. Obviously the first reason for that is because the "blob" needs to be a file path and not a blob.
    Second reason is no databases that I know of take a hash data type. Some take arrays. But I doubt that is worth the trouble.
    You have a collection of name value (path) pairs. Iterate over the collection and for each name do an insert of the name and path.

  • Plsql object type polymorphism

    Hi everyone.
    Is adhoc polymorphism possible in pl/sql using Oracle's object types? Here is some sample code that I tried on an Oracle 10.2.0.3 64-bit database running on Solaris.
    Connected.
    09:58:58 SQL> create type root_ty as object (
    09:59:03   2    a1     varchar2(32 char)
    09:59:03   3  ) not final
    09:59:03   4  /
    Type created.
    Elapsed: 00:00:00.17
    09:59:05 SQL> create type sub_ty under root_ty (
    09:59:10   2    a2     varchar2(32 char)
    09:59:10   3  , constructor function sub_ty(str in varchar2) return self as resul
    09:59:10   4  , member procedure display_a2
    09:59:10   5  ) final
    09:59:10   6  /
    Type created.
    Elapsed: 00:00:00.06
    09:59:12 SQL> create or replace type body sub_ty is
    09:59:18   2    constructor function sub_ty(str in varchar2)
    09:59:18   3      return self as result
    09:59:18   4    is
    09:59:18   5    begin
    09:59:18   6      self.a2 := str;
    09:59:18   7     
    09:59:18   8      return;
    09:59:18   9    end;
    09:59:18  10   
    09:59:18  11    member procedure display_a2
    09:59:18  12    is
    09:59:18  13    begin
    09:59:18  14      dbms_output.put_line('a2 value is .... '||a2);
    09:59:18  15    end;
    09:59:18  16  end;
    09:59:18  17  /
    Type body created.
    Elapsed: 00:00:00.04
    09:59:20 SQL> set serveroutput on
    10:00:31 SQL> declare
    10:00:35   2    l_ty    root_ty;
    10:00:35   3  begin
    10:00:35   4    l_ty := new sub_ty('Woot!');
    10:00:35   5   
    10:00:35   6    l_ty.display_a2();
    10:00:35   7  end;
    10:00:35   8  /
      l_ty.display_a2();
    ERROR at line 6:
    ORA-06550: line 6, column 8:
    PLS-00302: component 'DISPLAY_A2' must be declared
    ORA-06550: line 6, column 3:
    PL/SQL: Statement ignored
    Elapsed: 00:00:00.06
    10:00:37 SQL> declare
    10:00:53   2    l_ty    root_ty;
    10:00:53   3  begin
    10:00:53   4    l_ty := new sub_ty('Woot!');
    10:00:53   5   
    10:00:53   6  --  l_ty.display_a2();
    10:00:53   7  end;
    10:00:53   8  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.01
    10:00:53 SQL> declare
    10:01:30   2    l_ty    sub_ty;
    10:01:30   3  begin
    10:01:30   4    l_ty := new sub_ty('Woot!');
    10:01:30   5   
    10:01:30   6    l_ty.display_a2();
    10:01:30   7  end;
    10:01:30   8  /
    a2 value is .... Woot!
    PL/SQL procedure successfully completed.Certainly seems like this should be possible ... Am I missing something simple?
    Thanks for any input.
    - KR

    Here is an example of what polymorphism is supposed to do:
    SQL> create type bird as object
      2  (name varchar2 (30)
      3  , member function fly return varchar2
      4  , member function make_a_noise return varchar2)
      5  not final
      6  /
    Type created.
    SQL>
    SQL> create type birds_nt as table of bird;
      2  /
    Type created.
    SQL>
    SQL>
    SQL> create or replace type body bird as
      2
      3      member function fly return varchar2
      4      is
      5      begin
      6          return 'my name is '||self.name;
      7      end;
      8
      9      member function make_a_noise return varchar2
    10      is
    11      begin
    12          return 'generic twitter';
    13      end;
    14
    15  end;
    16  /
    Type body created.
    SQL>
    SQL>
    SQL> create type duck under bird (
      2  overriding member function make_a_noise return varchar2
      3  , member procedure waddle
      4  );
      5  /
    Type created.
    SQL>
    SQL> create or replace type body duck as
      2
      3
      4      overriding member function make_a_noise return varchar2
      5      is
      6      begin
      7          return 'quack!';
      8      end;
      9
    10      member procedure waddle
    11      is
    12      begin
    13          null;
    14      end;
    15
    16
    17  end;
    18  /
    Type body created.
    SQL>
    SQL>
    SQL>
    SQL> create type chicken under bird (
      2  overriding member function make_a_noise return varchar2
      3  , member procedure peck
      4  )
      5  not final;
      6  /
    Type created.
    SQL>
    SQL> create or replace type body chicken as
      2
      3
      4      overriding member function make_a_noise return varchar2
      5      is
      6      begin
      7          return 'cluck!';
      8      end;
      9
    10      member procedure peck
    11      is
    12      begin
    13          null;
    14      end;
    15
    16
    17  end;
    18  /
    Type body created.
    SQL>
    SQL> create type canary under bird (
      2  overriding member function make_a_noise return varchar2
      3  );
      4  /
    Type created.
    SQL>
    SQL> create or replace type body canary as
      2
      3
      4      overriding member function make_a_noise return varchar2
      5      is
      6      begin
      7          return 'I taught I taw a puddy tat!!!';
      8      end;
      9
    10
    11  end;
    12  /
    Type body created.
    SQL>
    SQL> create type rooster  under chicken (
      2  overriding member function make_a_noise return varchar2
      3  )
      4  ;
      5  /
    Type created.
    SQL>
    SQL> create or replace type body rooster as
      2
      3
      4      overriding member function make_a_noise return varchar2
      5      is
      6      begin
      7          return 'That''s a joke... I say, that''s a joke, son.';
      8      end;
      9
    10
    11  end;
    12  /
    Type body created.
    SQL>
    SQL>
    SQL>
    SQL>
    SQL> declare
      2      my_aviary birds_nt := birds_nt();
      3  begin
      4      my_aviary.extend(5);
      5      my_aviary(1) := duck('Donald');
      6      my_aviary(2) := chicken('Chicken Little');
      7      my_aviary(3) := canary('Tweetie Pie');
      8      my_aviary(4) := rooster('Foghorn Leghorn');
      9      my_aviary(5) := bird('?');
    10      for idx in my_aviary.first()..my_aviary.last()
    11      loop
    12          dbms_output.put_line( my_aviary(idx).fly() );
    13          dbms_output.put_line( my_aviary(idx).make_a_noise() );
    14      end loop;
    15  end;
    16  /
    my name is Donald
    quack!
    my name is Chicken Little
    cluck!
    my name is Tweetie Pie
    I taught I taw a puddy tat!!!
    my name is Foghorn Leghorn
    That's a joke... I say, that's a joke, son.
    my name is ?
    generic twitter
    PL/SQL procedure successfully completed.
    SQL>Now, in that loop woudl it make sense to execute a peck() on all of those entries? Nope. Furthermore as far as I can tell it is not possible to find out what sub-type an object is from with PL/SQL, so you couldn't even use Padders's TREAT ploy.
    So: if you want to do something generic use a super-type. If you want to do something specific use a sub-type.
    Cheers, APC
    blog: http://radiofreetooting.blogspot.com

  • How to handle plsql Object and Table type inside BPEL

    Hi All,
    I have a procedure with 5 IN and 4 OUT parameters. Out of 4, One is Object type and remaining 3 are Table type. Now in my bpel, i am calling this proc from DB Adapter. The DB Adapter wizard created XSD with proper structure. But when i am testing this i am not getting these out parameters values in the payload of Invoke DBAdapter activity. I am neither getting errors nor output.
    What could be the issue.?
    Thanks in advance,
    Sudheer

    Arik,
    JDev is not creating any wrapper packages as such. It simply created a XSD with same as my procedure name.
    My XSD looks like this...
    <element name="OutputParameters">
    <complexType>
    <sequence>
    <element name="P_OBJ_H_INFO_O" type="db:APPS.H_OBJ_TYPE" db:index="6" db:type="Struct" minOccurs="0" nillable="true"/>
    <element name="P_TAB_L_INFO_O" type="db:APPS.L_TAB_TYPE" db:index="7" db:type="Array" minOccurs="0" nillable="true"/>
    <element name="P_TAB_M_INFO_O" type="db:APPS.M_TAB_TYPE" db:index="8" db:type="Array" minOccurs="0" nillable="true"/>
    <element name="P_TAB_A_INFO_O" type="db:APPS.A_TAB_TYPE" db:index="9" db:type="Array" minOccurs="0" nillable="true"/>
    </sequence>
    </complexType>
    </element>
    And again the 3 table types internally referring object types.
    Thanks for reply. Awaiting response...
    Sudheer

  • Difference between MAP member and ORDER member  method in PLSQL Object Type

    Hi all,
    I need to know clear explanation about the MAP and ORDER member method and its Difference.Please share if you know.
    thanks in advance.
    regards,
    Lokesh
    Edited by: 972864 on Dec 10, 2012 1:50 AM

    http://docs.oracle.com/cd/B28359_01/appdev.111/b28371/adobjbas.htm#autoId13

  • When will the Timesten support PL/SQL?

    We have used pl/sql to develop the application on RDBMS.
    We would like to use the Timesten on the new application in Q2.
    Anyway We would like to develop PL/SQL as well.
    We have some questions, That're simply.
    1.The TimesTen support PL/SQL or not?
    2. If not support, When will the Timesten supoort PL/SQL?
    Thanks.

    This question was answered by Susan Cheung just a day or so back:
    plsql objects in timesten
    It's not supported at the moment; it's hoped it will be in the future...

  • How to disable PLSQL (PLSQL=0) in sys.odbc.ini file in timesten

    Hi,
    Can any one suggest how to set PLSQL=0 in timesten for existing datastore.
    I have already updated the dsn configuration with PLSQL=0 in sys.odbc.ini file.and i was stopped all the applications which are connected to Datastore after that when i am connecting to datastore ,getting the below warning message.
    connect "dsn=TT_tt70_32;uid=onevoice;pwd=onevoice";
    Warning  6226: Ignoring value requested for first connection attribute 'PLSQL' -- value currently in use: 1, requested value: 0
    Connection successful: DSN=TT_tt70_32;UID=onevoice;DataStore=/opt/timesten/tt7032/TimesTen/TT_tt70_32/info/TT_tt70_32;DatabaseCharacterSet=AL32UTF8;ConnectionCharacterSet=US7ASCII;DRIVER=/opt/timesten/tt7032/TimesTen/TT_tt70_32/lib/libtten.so;PermSize=40;TempSize=32;TypeMode=0;
    from the above message i got PLSQL attribute we could only set at first connection of dsn.But now i need to update PLSQL=0 as now which is already in use .
    Is it possible or not?

    Hi,
    I am working on 11.2.1 release only and DSN name only correct i am able to connect to datatore but i am getting the warning message as above mentioned after updating the DSN configuration in sys.odbc.ini file
    [TT_tt70_32]
    Driver=/opt/timesten/tt7032/TimesTen/TT_tt70_32/lib/libtten.so
    DataStore=/opt/timesten/tt7032/TimesTen/TT_tt70_32/info/TT_tt70_32
    PermSize=40
    TempSize=32
    DatabaseCharacterSet=AL32UTF8
    PLSQL=0
    (updated with this).
    After i am able connect to dsn but getting the above warning message and PLSQL was not disable.
    Edited by: 865636 on Feb 3, 2012 11:31 PM
    Edited by: 865636 on Feb 3, 2012 11:33 PM

  • Why or When should we use Execute Immediate in PLSQL??

    Hi Frnds,
    Long Ago i have received a interview question that ...
    How can U create a table in the PLSQL object(Function or procedure)?
    But the thing y should we use execute immediate?
    In which scenario we should we should use????????????
    Why or When should we use Execute Immediate in PLSQL????

    OR
    http://stackoverflow.com/questions/18375990/oracle-what-does-execute-immediate-means
    For DML you'd use it when running statements that you don't have available at compile time, e.g. if the column list is based on a selection from the user.
    In your case it's being used because DDL cannot be run as static SQL from within PL/SQL. Only certain query, DML and TCL commands are valid. Anything else has to be treated as dynamic.
    I'd say it's rare to need to use DDL from a PL/SQL block. TRUNCATE might be reasonable; if you find anything creating or dropping objects on the fly then that might be more of a concern as it can suggest a suboptimal data model.
    EXECUTE IMMEDIATE itself does not automatically commit; but if you execute DDL then that will behave the same as if you ran it outside PL/SQL, so it will commit in your case, yes.
    Incidentally, I'm not sure why your code is using an intermediate variable to hold the statement; that's useful if you want to display what it's going to run maybe, but you don't seem to be doing that. What you have could be done as:
    EXECUTE IMMEDIATE 'TRUNCATE TABLE BD_BIDS_EXT_DET';
    Thank you

  • Capturing PLSQL compilation error in PLSQL

    Hi,
    I am thinking of compiling a package through another package. If the compilation returns an error, how can i capture that error?
    I want to grab the error and format them on an email.
    I am talking about the error that we see in SQL*Plus when we use SHOW ERROR command after compiling a PLSQL object.
    I hope I am being clear with my question.
    Thanks before
    Joel

    There is a data dictionary view called USER_ERRORS which contains details of any compilation errors.

  • Call from Java Plsql Procedure with VArray as Out Parameter

    Hi,
    I have a Java web application(Tomcat server) that call a plsql procedure with Varray as OUT parameter.
    The Plsql code is perfectly compiled.
    When i run the application, I get the following error msg in my Tomcat window:
    java.sql.SQLException: ORA-06530: Reference to uninitialized composite
    ORA-06512: at "SEMS1.PACK_SEMSADMIN_OFFEREDJOBS", line 102
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:109
    3)
    at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStat
    {color:#0000ff}
    Doubt: Do I need to declare ArrayDescriptors to retrieve the VArray from the Plsql procedure.
    I think the below statement is enough; we need ArrayDescriptors only when we we wish to send a Plsql Object or Varray from Java code to the procedure. Plz correct me if not so.
    dbCallableStatement.execute();
    ARRAY SimpleOUTArray = (ARRAY) ((OracleCallableStatement) dbCallableStatement).
    getObject(Integer.parseInt(arlParameterOutIndex.get(i).toString()));{color}
    I am unable to realize where the mistake is?
    {color:#800000}
    {color}{color:#800000}
    VARRAY AND PROC DETAILS:
    TYPE STRUCT_JOB_DETAILS AS OBJECT
    APPL_NO NUMBER (10),
    S_FNAME VARCHAR2 (32 Byte),
    S_MI VARCHAR2 (32 Byte),
    S_LNAME VARCHAR2 (32 Byte),
    APPL_DATE DATE,
    DESCRIPTION VARCHAR2 (100 Byte),
    S_UCID VARCHAR2 (8 Byte)
    TYPE VARRAY_JOB_DETAILS IS VARRAY(100) OF STRUCT_JOB_DETAILS;{color}
    {color:#800000}PROCEDURE:{color}
    {color:#800000}CREATE OR REPLACE PACKAGE PACK_SEMSADMIN_OFFEREDJOBS
    AS
    TYPE Generic_Cursor_Type IS REF CURSOR;
    --TYPE varray_job_detail is VARRAY(100) OF STRUCT_JOB_DETAILS;
    --va_varray_job_detail varray_job_detail := varray_job_detail();
    va_varray_job_detail VARRAY_JOB_DETAILS := VARRAY_JOB_DETAILS();
    PROCEDURE Admin_Jobs_Offered_Rtr
    ic_status IN VARCHAR2,
    or_offered_jobs OUT Generic_Cursor_Type,
    va_varray_job_detail OUT VARRAY_JOB_DETAILS
    CREATE OR REPLACE PACKAGE BODY PACK_SEMSADMIN_OFFEREDJOBS
    AS
    PROCEDURE Admin_Jobs_Offered_Rtr
    ic_status IN VARCHAR2,
    or_offered_jobs OUT Generic_Cursor_Type,
    va_varray_job_detail OUT VARRAY_JOB_DETAILS
    AS
    vc_query VARCHAR2(15000) := '';
    vc_query_1 VARCHAR2(15000) := '';
    counter NUMBER := 1;
    vc_no NUMBER := 0;
    or_applicants_list Generic_Cursor_Type;
    TYPE type_appln_list IS RECORD
    job_no NUMBER(10),
    job_title VARCHAR2(50 BYTE),
    account_no VARCHAR2(10 BYTE),
    head_fname VARCHAR2(32 BYTE),
    head_minitial VARCHAR2(10 BYTE),
    head_lname VARCHAR2(32 BYTE),
    num NUMBER
    vn_appln_list type_appln_list;
    TYPE type_job_offered IS RECORD
    APPL_NO NUMBER (10),
    S_FNAME VARCHAR2 (32),
    S_MI VARCHAR2 (32),
    S_LNAME VARCHAR2 (32),
    APPL_DATE DATE,
    DESCRIPTION VARCHAR2 (100),
    S_UCID VARCHAR2 (8)
    vn_job_offered type_job_offered;
    BEGIN
    vc_query := vc_query || ' SELECT jobs.job_no,job_title, account_no, head_fname, head_minitial, head_lname, num';
    vc_query := vc_query || ' FROM jobs, ( ' ;
    vc_query := vc_query || ' SELECT jobs.job_no,count(*) as num' ;
    vc_query := vc_query || ' FROM student_apps ,jobs ' ;
    vc_query := vc_query || ' WHERE jobs.job_no = student_apps.job_no' ;
    vc_query := vc_query || ' AND (student_apps.status in (''o'',''t'')) '; --|| ic_status || ')' ;
    vc_query := vc_query || ' AND jobs.status not in (''z'', ''Z'')' ;
    vc_query := vc_query || ' GROUP BY jobs.job_no' ;
    vc_query := vc_query || ' ) no_apps_off' ;
    vc_query := vc_query || ' WHERE jobs.job_no = no_apps_off.job_no' ;
    dbms_output.put_line('Executed Query_1');
    va_varray_job_detail := VARRAY_JOB_DETAILS();
    va_varray_job_detail.extend(100);
    OPEN or_offered_jobs FOR vc_query;
    LOOP
    FETCH or_offered_jobs INTO vn_appln_list;
    EXIT WHEN or_offered_jobs%NOTFOUND;
    vc_query_1 := '';
    vc_query_1 := vc_query_1 || ' SELECT stud_apps.appl_no APPL_NO, stud_apps.s_fname S_FNAME, ';
    vc_query_1 := vc_query_1 || ' stud_apps.s_mi S_MI, stud_apps.s_lname S_LNAME, ';
    vc_query_1 := vc_query_1 || ' stud_apps.appl_date APPL_DATE, look_up.description DESCRIPTION, ' ;
    vc_query_1 := vc_query_1 || ' stud_apps.s_ucid S_UCID ' ;
    vc_query_1 := vc_query_1 || ' FROM student_apps stud_apps,jobs jbs,lookup look_up' ;
    vc_query_1 := vc_query_1 || ' WHERE stud_apps.status in (''o'',''t'') '; --(' || ic_status || ') ' ;
    vc_query_1 := vc_query_1 || ' AND jbs.job_no = stud_apps.job_no' ;
    vc_query_1 := vc_query_1 || ' AND jbs.status not in (''z '', ''Z'')' ;
    vc_query_1 := vc_query_1 || ' AND stud_apps.status = look_up.code ' ;
    vc_query_1 := vc_query_1 || ' AND look_up.type = ''st''' ;
    vc_query_1 := vc_query_1 || ' AND stud_apps.job_no = ''' || vn_appln_list.job_no || ''' ' ;
    vc_query_1 := vc_query_1 || ' ORDER BY appl_date' ;
    dbms_output.put_line('Executed Query_2');
    OPEN or_applicants_list FOR vc_query_1;
    LOOP
    FETCH or_applicants_list INTO vn_job_offered;
    EXIT WHEN or_applicants_list%NOTFOUND;
    va_varray_job_detail(counter).APPL_NO := vn_job_offered.APPL_NO;
    va_varray_job_detail(counter).S_FNAME := vn_job_offered.S_FNAME;
    va_varray_job_detail(counter).S_MI := vn_job_offered.S_MI;
    va_varray_job_detail(counter).S_LNAME := vn_job_offered.S_LNAME;
    va_varray_job_detail(counter).APPL_DATE := vn_job_offered.APPL_DATE;
    va_varray_job_detail(counter).DESCRIPTION := vn_job_offered.DESCRIPTION;
    va_varray_job_detail(counter).S_UCID := vn_job_offered.S_UCID;
    counter := counter + 1;
    END LOOP; --end of FOR
    CLOSE or_applicants_list;
    END LOOP; -- end of FETCH
    END Admin_Jobs_Offered_Rtr;
    END PACK_SEMSADMIN_OFFEREDJOBS;
    /{color}
    Reqire help plzzzz !!!
    Thanks.

    Originally posted by JDBC Development Team:
    It's very similar to other datatype except that it uses OracleTypes.ARRAY typecode and the value is mapped to a oracle.sql.ARRAY instance. The code looks as follows --
    cstmt.registerOutParameter (idx, OracleTypes.ARRAY, "VARRAY_TYPE_NAME_HERE");
    cstmt.execute ();
    ARRAY array = (ARRAY) cstmt.getObject (idx);
    Thanks for your reply.
    I have to use:-
    OracleCallableStatement cs1 = (OracleCallableStatement )conn.prepareCall
    ( "{call proj_array(?)}" ) ;
    for retrieving a collection as an OUT parameter.
    This gives me the errors:-
    C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Blob getBlob(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
    import java.sql.*;
    ^
    C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Array getArray(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
    import java.sql.*;
    ^
    C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Clob getClob(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
    import java.sql.*;
    ^
    C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Ref getRef(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
    import java.sql.*;
    ^
    How do I get rid of these errors?
    null

  • Forms 10g Builder Crashes when open plsql editor

    I ve installed Oracle 10g(10.1.2.02) Developer on Ubuntu 9.10.
    Even i can open and compile forms without any problem when i try to create a new plsql object or open
    an existing Builder closes immediatelly.
    Thanks in advance for your help.

    What do u mean?
    My problem is that when i open an fmb and try to right click or double click on a procedure
    or a function to see the code , builder closes .In terminal i get this
    X Error of failed request: BadWindow (invalid Window parameter)
    Major opcode of failed request: 8 (X_MapWindow)
    Resource id in failed request: 0x0
    Serial number of failed request: 13405
    Current serial number in output stream: 13415

Maybe you are looking for

  • Printing Probelm

    Hi,     We have developed a smartform for Voucher document printing. In print preview displaying line items only 1 time. When taking print its coming every line items  2 times. Whats the problem for that. Kindly suggest .

  • Trying to install Acrobat 9.5.2 update

    I'm trying to install Acrobat 9.5.2 update; when prompted to "choose the copy of AA Pro to update", the file is "grayed".  Any help would be sincerely appreciated!

  • I have just had my hard drive replaced and now I can.t find Air Port to get wi fi

    I have just had my hard drive replaced and now I can't find Air Port for my wi fi

  • Images in dashboard after deploying obiee 10g in weblogic server

    Hi, We have deployed OBIEE 10g in weblogic server at the location E:\BIDEP Initially for OC4j server we placed the images in two places: +1. E:\OracleBI\web\app\res\s_oracle10\images+ +2. E:\OracleBI\oc4j_bi\j2ee\home\applications\analytics\analytics

  • Difference between ways to print a report

    Hello friends at www.oracle.com , I have a Forms program that, before printing, asks the user about where he wants to send the report: to the Previewer (before printing), or send it directly to printer. However, there's a field that, when printed thr