I am using the st_polyfromtext command to insert features into an Oracle database like this:

INSERT INTO polygon_test VALUES (

sde.st_polyfromtext ('polygon ((10.01 20.03, 10.52 40.11, 30.29 41.56, 31.78 10.74, 10.01 20.03))', 0) );

I am crafting the sql by hand in a C# web service and using OracleConnection and OracleCommand to execute the sql. I am using bind variables (:) and OracleParameter to bind the attribute values i send in with the spatial feature. My issue is that if the feature is very complex and has alot of vertices then i get an Oracle error about literal string too long. How can i send this coordinate string into Oracle and have it recognized as a feature when i keep hitting this cap? I have tried to assign the OracleParameter as a CLOB datatype and then bind the :SHAPE to that but it still balks.

  • SDO is not an option at this point in time. Even if it were i think the issue of a lengthy input object would still be present. – VBAHole Jun 26 '14 at 18:25
  • I had a similar problem with PostgreSQL which turned out to be the client, I doubt it in this case. What is the maximum length for a string in Oracle communication and can that be changed? This is possibly a question for dba.stackexchange.com they might know. Even though the question has a spatial component the problem is (possibly) Oracle/SQL related. – Michael Stimson Jun 26 '14 at 21:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.