Code: Select all
var
S: TOraSession;
Q: TOraQuery;
procedure WriteParam (Name: string);
var L: integer; S: string;
begin
with Q.Params.ParamByName (Name) do
begin
S := AsString;
L := System.Length (S);
if L < 20
then WriteLn (Name, ' = [', S, ']')
else WriteLn ('Length (', Name, ') = ', L);
end;
end;
begin
S := TOraSession.Create (nil);
S.ConnectString := 'test/[email protected]';
Q := TOraQuery.Create (S);
Q.SQL.Text := 'begin :a := :b; if 1 < 0 then :b := ''abcde''; end if; end;';
Q.ParamByName ('a').ParamType := ptInputOutput;
Q.ParamByName ('a').DataType := ftMemo;
Q.ParamByName ('a').AsString := '';
Q.ParamByName ('b').ParamType := ptInputOutput;
Q.ParamByName ('b').DataType := ftMemo;
Q.ParamByName ('b').AsString := 'fuckedshit';
WriteParam ('a');
WriteParam ('b');
WriteLn ('-----');
Q.ExecSQL;
WriteParam ('a');
WriteParam ('b');
ReadLn;
end.Code: Select all
a = []
b = [fuckedshit]
-----
a = [fuckedshit]
Length (b) = 65514