Subject | Re: [IBO] Re: RETURNING_VALUES KeyWord failing |
---|---|
Author | Filipe Belchior |
Post date | 2004-07-08T18:52:54Z |
Constantijn,
is it?
in a TIB_DSQL.SQL.TEXT
"EXECUTE PROCEDURE sp_geraconta_so (:P1, :P2, :P3, :P4) RETURNING_VALUES
:Rows_Aff"
, after...
TIB_DSQL.prepare... provide values for inputparameters...
,Execute...
And finally, you retrieve the outputparameter via the Fields property:
ok?
is it?
in a TIB_DSQL.SQL.TEXT
"EXECUTE PROCEDURE sp_geraconta_so (:P1, :P2, :P3, :P4) RETURNING_VALUES
:Rows_Aff"
, after...
TIB_DSQL.prepare... provide values for inputparameters...
,Execute...
And finally, you retrieve the outputparameter via the Fields property:
ok?
----- Original Message -----
From: "constantijnw" <cw.s@...>
To: <IBObjects@yahoogroups.com>
Sent: Thursday, July 08, 2004 3:29 PM
Subject: [IBO] Re: RETURNING_VALUES KeyWord failing
>
> Hi Filipe,
>
> > I am calling an "EXECUTE PROCEDURE" in a TIB_DSQL.
> > But occurs an exception: "Token unknown: RETURNING_VALUES".
> >
> > SQL:
> > EXECUTE PROCEDURE sp_geraconta_so "07/2004", 50, 20, 30
> > RETURNING_VALUES :Rows_Aff
> >
>
> You can't use Firebirds PSQL (procedure/trigger) language outside the
> server.
>
> Your SP takes 4 inputparameters (lets say P1, P2, P3, P4), executes a
> DML statement and returns ROW_COUNT via the Rows_Aff outputparameter.
> Right?
>
> Then the SQL statement in TIB_SQL looks like this:
> EXECUTE PROCEDURE sp_geraconta_so (:P1, :P2, :P3, :P4);
>
> You provide values for those parameters (after a prepare) via the
> Params property:
> sp_geraconta_so.ParamByName('P1').AsString := '07/2000';
> etc. for all other inputparameters
>
> You execute this SP via:
> sp_geraconta_so.Execute;
>
> And finally, you retrieve the outputparameter via the Fields property:
> RowsAff := sp_geraconta_so.FieldByName('Rows_Aff').AsInteger;
>
> Constantijn
>
>
>
>
>
>
>
___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or
InterBase
> without the need for BDE, ODBC or any other layer.
>
___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info
papers,
> keyword-searchable FAQ, community code contributions and more !
> Yahoo! Groups Links
>
>
>
>
>
>