Postgresql out argument for parameters in functions
Posted: 18.02.2008, 14:51
Hi,
How does one get the value returned into a Postgresql 'out' function parameter with Zeoslib?
For example.
Postgres function
'create or replace function test1(in varchar, in char, out varchar);
..etc
When calling the function from a TZQuery
SQL.Text := 'select test1(:par1, :par2)';
..etc
This works great, but how does one get the out parameter value?
I tried to add the out parameter like this before ExecSQL
qry.Params.CreateParam('ouputfld', ftString, ptOutput);
However the 'outfld' param does not contain the value passed from the server after the ExecSQL; (just '')
If this is possible to do this with Zeos? I really hope so.
I am using version 6.6.1 at the moment.
Thanks
Siegfried
How does one get the value returned into a Postgresql 'out' function parameter with Zeoslib?
For example.
Postgres function
'create or replace function test1(in varchar, in char, out varchar);
..etc
When calling the function from a TZQuery
SQL.Text := 'select test1(:par1, :par2)';
..etc
This works great, but how does one get the out parameter value?
I tried to add the out parameter like this before ExecSQL
qry.Params.CreateParam('ouputfld', ftString, ptOutput);
However the 'outfld' param does not contain the value passed from the server after the ExecSQL; (just '')
If this is possible to do this with Zeos? I really hope so.
I am using version 6.6.1 at the moment.
Thanks
Siegfried