Subject | Re: [firebird-support] IF and only IF |
---|---|
Author | Alberto Pesce |
Post date | 2006-02-04T16:33:27Z |
Thank all for your's ideas
Alberto
Alberto
----- Original Message -----
From: "Lucas Franzen" <luc@...>
To: <firebird-support@yahoogroups.com>
Sent: Saturday, February 04, 2006 1:49 PM
Subject: Re: [firebird-support] IF and only IF
>
>
> Alberto,
>
> Alberto Pesce schrieb:
> > I need to make this:
> >
> > execute get_number('P', 2006)
> >
> > Insert into table ( ) values( )
> >
> > if and only if Inserted values in table {
> >
> > execute set_number('P', 2006)
> >
> > }
> > else
> > exception ....
>
>
> Inside PSQL you can use ROW_COUNT which will return the number of rows
> affected of the last DML_Operation.
>
> IF ( ROW_COUNT ) = 0 then nothing happened
> ELSE something happened.
>
> So if the insert is done by another procedure just make this procedure
> return the ROW_COUNT as output parameter.
>
> Luc.
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://firebird.sourceforge.net and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Yahoo! Groups Links
>
>
>
>
>
>
>