CLOB and Stored Procedure



Hi,

i'm using ORACLE 9i and Delphi 2005.

I'm looking for some examples about using CLOB field from a stored procedure.
I have a field in a one field table defined as CLOB (ORACLE) and i have a dummy stored procedure suppose to insert in this field some Data, a text file of 221 kb, add something and return the whole thing as a CLOB.


Stored Procedure:
function CLOB_TEST( INPUT CLOB) return CLOB
is
  C clob;
  i number;
begin
  dbms_lob.createtemporary(C,true);
  for i in 1..3300 loop
    dbms_lob.writeappend(C,'012',3) ;
	end loop;
    dbms_lob.writeappend(C,'END',3) ;
  return C;
end;

Delphi 2005 (Win32) Code:

    ADOStoredProc1.ProcedureName := 'CLOB_TEST';

    with ADOStoredProc1.Parameters.AddParameter do
    begin
      Name := 'RETURN_VALUE';
      DataType := ftOraClob;
      Direction := pdReturnValue;
    end;

    with ADOStoredProc1.Parameters.AddParameter do
    begin
      Name := 'CLOB';
      DataType := ftOraClob;
      Direction := pdInput;
      Value := mmText.Text;
    end;

    ADOStoredProc1.ExecProc;

When i run this i got an error:
"Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another."


Can someone help me, please, to answer to these questions?

1) ftOraClob is not the right DataType to use?
2) There is a limit to the quantity of data i can use with Stored procedure?
3) Do i do this wrong?

Tia

Laurent
.



Relevant Pages

  • Re: CLOB and Stored Procedure
    ... Michael Jacobs wrote: ... I have a field in a one field table defined as CLOB and i have ... DataType:= ftOraClob; ...
    (borland.public.delphi.database.ado)
  • Re: CLOB and Stored Procedure
    ... > i'm using ORACLE 9i and Delphi 2005. ... > I have a field in a one field table defined as CLOB and i have ... > Stored Procedure: ... > for i in 1..3300 loop ...
    (borland.public.delphi.database.ado)
  • stored procedure with CLOB out parameter wont work with oracle provider
    ... We have the following stored procedure in Oracle 10g database: ... PROCEDURE GET_CLOB ... TCHAR stuff; ... Previously for previous versions of Oracle Provider for OLEDBOracle ...
    (microsoft.public.data.oledb)
  • Re: Help with RichEdit and CLOB Oracle filed
    ... > 1) Pass the contents of a RichEdit into a Stored Procedure CLOB field. ... 3).But still have a problem,you can't insert the Non-Ansi characters to the clob column, eg Chinese character. ...
    (borland.public.delphi.database.ado)
  • RE: (Fwd) DBD::Oracle (CLOB and sp)
    ... On 09-Dec-2003 Tim Bunce wrote: ... > Im having troubles here in Brazil about fetching clob in out param from a stored procedure ... >, vreturn out clob) ...
    (perl.dbi.users)