Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java oracle sql array problem

793966Aug 24 2011 — edited Apr 4 2012
Hi,
Let me give you the code first:
Object[] elements = new Object[msisdns.size()];
for(int i=0;i<msisdns.size();i++){
	elements[i] = msisdns.get(i);
}
ArrayDescriptor arrayDesc = ArrayDescriptor.createDescriptor("TYPE_MSISDN_ARR", conn);
ARRAY array = new ARRAY(arrayDesc, conn, elements);
Now let me explain step by step. "msisdns" is of type:
List<String>
and it has 1000 elements in it.
"TYPE_MSISDN_ARR" is a collection type and simply:
is table of varchar2(10)
conn is my connection.

My problem is that even though the "elements" has the data in it, I am not able to create the "array" including the same data. It is always created
with null data even though it retrieves the size true, in this case 1000. So the size is retrieved and correct but not the data. Any ideas?

Edited by: baydinfb on Aug 24, 2011 3:55 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 2 2012
Added on Aug 24 2011
3 comments
226 views