-
Hi,
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,
Example
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?
Badrinath
-
Could some one look at this, please
Badrinath
-
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).
-
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.
Kavita
KN
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|