Skip to Main Content

Java Development Tools

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!

post an array using a bind variable

19876Oct 2 2003 — edited Jun 5 2007
I have collected an array of oracle.jbo.domain.Number [] that represent coordinates for a geometry. I now want to insert this into the database using a Statement, e.g.

"INSERT INTO GEOM_TABLE (ID, GEOMETRY)
VALUES
(1,
MDSYS.SDO_GEOMETRY(
2003
, NULL
, NULL
, MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1)
, MDSYS.SDO_ORDINATE_ARRAY(:1)))"


and then bind :1 to an ARRAY object. How can I do this?

I found some example code:
ArrayDescriptor desc = ArrayDescriptor.createDescriptor("MDSYS.SDO_ORDINATE_ARRAY",conn);
ARRAY newArray = new ARRAY(desc, conn, elements);

but I do not know how to get a connection because I want it to use the transaction already used by the AM.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 3 2007
Added on Oct 2 2003
8 comments
648 views