Problems writing to a temporary lob in PL/SQL
10/01/2018 11:47
Hi, oracle version 8.1.5 - on some hpunix server.

The following procedure when executed, receives the error: SQL>execute testclob;call dbms_lob.writeBEGIN testclob; END; *ERROR at line 1: ORA-21560: argument 2 is null, invalid, or out of range PROCEDURE TESTCLOB AS f_clob clob; str varchar2(32767); b_int binary_integer;BEGIN b_int := 32767; str := 'See if I can write and read this to a temporary lob'; -- create temp lob and open in readwrite mode dbms_lob.createtemporary(f_clob, TRUE); dbms_lob.open(f_clob, dbms_lob.lob_readwrite); dbms_output.put_line('call dbms_lob.write'); dbms_lob.write(f_clob, b_int, 1, str); dbms_output.put_line('write to temp lob success'); str := ''; dbms_lob.read(f_clob, b_int, 1, str); dbms_output.put_line(str); dbms_lob.close(f_clob); END; After reading the oracle documentation and following their examplesand searching google for the error I receive, I am still unable tofind the source of my problem. Can anyone please help me!!! BTW I get the same error when trying to open a file into a temporarylob using the DBMS_LOB.FILEOPEN procedure.

- Tom Williams

Source is Usenet: comp.databases.oracle.server
Sign in to add a comment

Answer score: 5
10/01/2018 11:47 - Thanx - works now.

I actually tried that to start with (with some modification)...

strlength := length(str);.

.

.

str := str || chr(10);dbms_lob.writeappend(f_clob, strlength+1, str); but that call failed (I had to take a length of str at write time) andthen I saw in all the examples in the Oracle documentation they usedmaxsize for the binary integer, so that is why I started using that.

- Tom Vladimir M. Zakharychev <bob@dpsp-yes.com> wrote in message news:<at7f0b$iqs$1@babylon.agtel.net>...


Source is Usenet: comp.databases.oracle.server
Sign in to add a comment

eDiscover
Helpforce eDiscover provides technical articles updated each dayHelpforce eDiscover RSS feed contains the latest technical articles in RSS
Click the logo to go back to the main page
Search eDiscover
  
Categories

Click an icon to go to that category

Helpforce eDiscover contains articles about Microsoft Windows Helpforce eDiscover contains articles about Apple products and MacOS Helpforce eDiscover contains articles about Linux and POSIX operating systems Helpforce eDiscover contains articles about Helpforce Helpforce has a large variety of technical information and articles for you to read Helpforce eDiscover contains articles about databases, MYSQL, SQL Server Oracle Helpforce eDiscover contains articles about Java, JVM and the JRE Helpforce eDiscover contains articles about the QNX operating system Helpforce eDiscover contains articles about Oracle Solaris and Open Solaris Helpforce eDiscover contains articles about RISC OS, Acorn and the BBC Micro Helpforce eDiscover contains articles about Amiga and AmigaOS

Type your comment into the box below