Oracle sucks once again

Posted by Mike Haller on Sunday, December 24. 2006 at 00:00 in Java
If you are using iBatis SqlMaps and execute a stored procedure, you should probably not format the SQL string, e.g.:

<procedure id="exec" parameterClass="org.example.Param">
 {
      call p_main (
              #param1:NUMERIC#,
              #param2:DATE# )
 }
</procedure>


java.sql.SQLException: Non supported SQL92 token at position: 4:
        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
        at oracle.jdbc.driver.OracleSql.handleToken(OracleSql.java:1165)
        at oracle.jdbc.driver.OracleSql.handleODBC(OracleSql.java:1064)
        at oracle.jdbc.driver.OracleSql.parse(OracleSql.java:984)
        at oracle.jdbc.driver.OracleSql.getSql(OracleSql.java:312)
        at oracle.jdbc.driver.OracleSql.getSqlBytes(OracleSql.java:557)


The solution: remove TABS and newlines from the SQL in the procedure call.

Jaffy
You are so right about Oracle

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications
 
Submitted comments will be subject to moderation before being displayed.
 

About

My name is Mike Haller and I'm a software developer and architect at Innovations Software Technology in Germany. I love programming, playing games and reading books. I like good food, making photos and learning and mentoring about the craftsmanship of commercial software development.

Quicksearch