ORA-14551 when using select for update inside a java stored procedure
Date: Fri, 28 Mar 2003 17:26:55 +0200
Message-ID: <3E8469BF.72666276_at_eurodyn.com>
Hi.
I have written a Java stored procedure in Oracle 8.1.6.1.0 Enterprise
where i try to update a BLOB column. Oracle's documentation clearly
states that prior to updating a LOB field, you must first get an
exclusive lock for the row, using the select for update statement.
Inside SQL*Plus, the statement of course works fine, but when executing
the PL/SQL procedure that calls the JSP i get an ORA-14551 error. The
code i use for locking the row is:
...
Connection dbConn =
DriverManager.getConnection("jdbc:default:connection:");
dbConn.setAutoCommit(false);
String lockStatement = "SELECT * FROM " + tableName + " WHERE ROWSEQNO="
+ String.valueOf(rowSequence) + " FOR UPDATE";
OracleCallableStatement stmt =
(OracleCallableStatement)dbConn.prepareCall(lockStatement);
stmt.execute();
...
I have tried this using either an OracleStatement object or any object i
could think of and i always get the same error.
How can i solve this issue? Could it be a 8.1.6 bug?
Regards,
Vasilis
Received on Fri Mar 28 2003 - 16:26:55 CET