oracle execute anonymous block with ptOutput parameter
Posted: 09.07.2018, 15:15
Hello,
how can I access ptOutput parameter from an anonymous block?
this simple code
doesn't work. I get the error
If I try to use the assignment ":=" without double ":", this error occurs:
how can I access ptOutput parameter from an anonymous block?
this simple code
Code: Select all
ZQuery1.SQL.Text := 'begin :result ::= 42; end;';
ZQuery1.Params.CreateParam(ftInteger,'result',ptOutput);
ZQuery1.ExecSQL;
fortytwo := ZQuery1.ParamByName('result').AsString;
Code: Select all
SQL Error: OCI_ERROR: ORA-06502: PL/SQL: numerischer oder Wertefehler: Zeichenfolgenpuffer zu klein
ORA-06512: in Zeile 1
Code: Select all
Incorrect token followed by ":"