I have the following procedure in oracle :
CREATE OR REPLACE PROCEDURE
INSERT_BYTE(pID IN Number,pData IN CLOB )
IS
reallybigtextstring CLOB := pData;
i INT;
BEGIN
WHILE Length(reallybigtextstring) <= 60000 LOOP
reallybigtextstring := reallybigtextstring
|| '000000000000000000000000000000000';
END LOOP;
INSERT INTO TESTCLOB
(ID ,C,D)
VALUES (pID,
reallybigtextstring,
'done');
END;
/
I am passing a string of more than 40000 bytes to this procedure by this code :
Dim Conn
Set Conn = Server.Createobject("ADODB.Connection")
Conn.Open "Driver={Oracle in XE};DBQ=xe;UID=biotpl;PWD=biotpl;"
strSQL = "INSERT_BYTE(1,'"& str &"') "
Set objExec = Conn.Execute(strSQL)
If Err.Number = 0 Then
Response.write("Process completed successfully...")
Else
Response.write("Error Save ["&strSQL&"] ("&Err.Description&")")
End IF
Conn.Close()
Set objExec = Nothing
Set Conn = Nothing
But the code crashes . If I have written the stored procedure as following :
CREATE OR REPLACE PROCEDURE
INSERT_BYTE(pID IN Number )
IS
reallybigtextstring CLOB := '123';
i INT;
BEGIN
WHILE Length(reallybigtextstring) <= 60000 LOOP
reallybigtextstring := reallybigtextstring
|| '000000000000000000000000000000000';
END LOOP;
INSERT INTO TESTCLOB
(ID ,C,D)
VALUES (pID,
reallybigtextstring,
'done');
END;
/
Then the code works fine . The main problem is passing more than 4000 characters to clob data . How to pass more than 4000 characters to clob field > Please help me .