CLOB Anyone?
From: The Magnet <art_at_unsu.com>
Date: Thu, 26 Aug 2010 14:23:23 -0700 (PDT)
Message-ID: <ca11f3e7-38f7-44da-ab2d-6f7cd8d0edca_at_x18g2000pro.googlegroups.com>
Om, I'm bleeping upset as I've been at this for 3 days and been all over the net with nothing. Maybe a genius from here can help. We are on 10g.
.
.
Date: Thu, 26 Aug 2010 14:23:23 -0700 (PDT)
Message-ID: <ca11f3e7-38f7-44da-ab2d-6f7cd8d0edca_at_x18g2000pro.googlegroups.com>
Om, I'm bleeping upset as I've been at this for 3 days and been all over the net with nothing. Maybe a genius from here can help. We are on 10g.
Task: Update a CLOB column. Actually replace the value, not
appending.
Code is this:
PROCEDURE update_message_by_message_id (
p_message_id NUMBER, p_sec_id NUMBER, p_variables VARCHAR2, p_name VARCHAR2, p_body CLOB, p_changed_by VARCHAR2, p_status VARCHAR2) IS
.
v_lob_locator CLOB := EMPTY_CLOB();
.
.
DBMS_LOB.OPEN (v_lob_locator,DBMS_LOB.LOB_READWRITE); DBMS_LOB.WRITE(v_lob_locator, LENGTH(p_body),1,p_body); DBMS_LOB.CLOSE(v_lob_locator);
Tried EVERYTHING. From a traditional UPDATE statement to this. Everything I try gives this error, EVERYTHING:
ORA-22275: invalid LOB locator specified
Even tried: UPDATE messages SET body = p_body WHERE message_id = p_message_id;
ORA-22275: invalid LOB locator specified
Any help? Please....... Received on Thu Aug 26 2010 - 16:23:23 CDT