This discussion is archived
3 Replies Latest reply: Apr 4, 2012 7:55 AM by rukbat RSS

Java oracle sql array problem

793966 Newbie
Currently Being Moderated
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
  • 1. Re: Java oracle sql array problem
    928509 Newbie
    Currently Being Moderated
    Jeah!

    This is exactly my problem too!

    Does anyone have the solution?

    Thanks very much

    Denis
  • 2. Re: Java oracle sql array problem
    gimbal2 Guru
    Currently Being Moderated
    The main reason the original poster did not get any answers at all is because this question is posted in completely the wrong forum.
  • 3. Re: Java oracle sql array problem
    rukbat Guru Moderator
    Currently Being Moderated
    Moderator Action:
    (1) O.P. never posted anything to the forums since starting this inquiry.
    (check their posting history in their user profile)
    That suggests they've disappeared and will never return.
    Resurrecting a post a year after it was started is poor forum etiquette.

    (2) Posting something to say "give me an answer instead of answering that original person" is a thread hijack. Hijacks are poor forum etiquette.

    (3) The entire question is outside the scope of the forum, thus irrelevant.

    Locking to prevent another thread resurrection/hijack.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points