#1 Re: mORMot 1 » Oracle clob stored procedure » 2015-09-29 11:59:28

I used BindTextP and the error is gone.
Thanx

#2 mORMot 1 » Oracle clob stored procedure » 2015-09-29 09:37:26

Marek
Replies: 2

Hello all,
I'm trying to access stored procedure with following code:

var
  out1    : Variant;
  p1      : integer;
  p2      : AnsiString;
  p3      : AnsiString;
  p4      : TMemoryStream;
  p5      : integer;
  p6      : integer;
  p7      : AnsiString;
begin
  Props := TSQLDBOracleConnectionProperties.Create('something','something','name','password');
  p1 := 0;
  p2 := '';
  p3 := '';
  p4 := TMemoryStream.Create;
  p5 := 0;
  p6 := 0;
  p7 := '';
  try
    query :=  'BEGIN get_msg(?, ?, ?, ?, ?, ?, ?); END;';
    stmt := Props.NewThreadSafeStatement;
    stmt.Prepare(query, false);
    stmt.Bind(1, p1, paramInOut);
    stmt.BindTextW(2, p2, paramIn);
    stmt.BindTextW(3, p3, paramIn);
    stmt.Bind(4, p4, paramOut);
    stmt.Bind(5, p5, paramOut);
    stmt.Bind(6, p6, paramOut);
    stmt.BindTextW(7, p7, paramOut);

    stmt.ExecutePrepared;
    stmt.ParamToVariant(4, out1, true);
  finally
    p4.Free;
    stmt.Free;
    Props.Free;
  end;

The fourth parameter should be clob but I do not know how to declare it in delphi.
In the case above, i got error, that blob #4 is unexpected.
How should I use it in Delhi 6 ?

Board footer

Powered by FluxBB