Skip to Main Content

Java Database Connectivity (JDBC)

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!

Passing a CLOB into a PL/SQL function

843859Jul 22 2010 — edited Nov 20 2014
Hi,
I have been using the SDO_UTIL.FROM_WKTGEOMETRY Oracle function to create the geometry field of my table when inserting a record. This function can take either a string or a clob and I have been using a string until I started to get the following error because the strings were more than 4000 bytes long:
ORA-01461: can bind a LONG value only for insert into a LONG column

So I have decided to use a clob instead, but every example I have found for inserting a clob into the database first inserts an empty clob and then uses a select statement to get the empty clob in order to populate it. However that is not much use to me because the field I am populating is of type SDO_GEOMETRY and not a clob, instead I am passing it as a parameter to a function. Does anyone know how I can bind the clob so I can use it as a parameter to the PL/SQL function?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 20 2010
Added on Jul 22 2010
2 comments
448 views