DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Arrays & procs

  1. #1
    Join Date
    Jan 2001
    This is a slight deviation, but thought it will be answered in this knowledged pool;

    One of the java applications wants to send a multi-dimension array into a DB procedure., and some updates needs to happen based on this,

    Java sends an array as
    id[200][12] which will contain value 50
    id{[201][11]= 40

    (means id number 200 at 12 th hour ,count = 50 etc)

    How do I handle this in the DB procedure?

  2. #2
    Join Date
    Jan 2001
    Could some one look at this, please

  3. #3
    Join Date
    Mar 2001
    Are you trying to send a single point in the array to the procedure or are you trying to send the whole array?

    I would have to say the reason you aren't getting many hits on this thread is because Oracle doesn't really deal with arrays in the traditional sense, so I'm not sure a procedure could handle an entire array (although I could be wrong).

  4. #4
    Join Date
    Feb 2000
    NJ, United States


    The Oracle version of an array would be a PL/SQL table or a
    varray. SInce PL/SQL table is not supported by Java, I think you can use varray to pass and get values from Java.

    For multi dimensional arrays what you can do is define an object type for ex:
    create type employee as object(colum1,colum2);
    create type emp_table as varray of employee;
    and the Jave procedure should also create the array in the same name and then it would be possible to pass it to Oracle and vice versa.

    Hope this helps you.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width