Page 1 of 1

Readiing stored procedures output paramters in ORACLE 10g

Posted: 05.08.2010, 11:40
by h.o.o.k
Hi all,
Please i dont know how read output parameters from stored procedure (oracle 10g)

this is my trivial proc:

create or replace PROCEDURE TEST_p
( test_out OUT NUMBER
) AS
BEGIN
select count(id) into test_out from cislovaci_plan;
END TEST_p;

and I tried this:

q := TZQuery.Create(self);
q.Connection := dmdb.conMain;
q.Params.CreateParam(ftInteger,'param1',ptOutput);
q.sql.Text := 'CALL test_p(:param1)';
q.ParamCheck := true;
q.ExecSQL;

This solution throw this exception:

ORA-01008: not all variables bound

Pleas help