Subject RE: [firebird-support] Re: Problem with quotes
Author Clay Shannon
Will the Real Programmer please stand up?

Real programmers don't tell other programmers they're not real programmers.

Get real.

Or better yet, reel-to-reel.

Clay Shannon,
Dimension 4 Software
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Jason Dodson
Sent: Monday, October 10, 2005 2:29 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Re: Problem with quotes

I think it would be more correct in saying that a "real" programmer wouldn't
be
doing this at all.

Jason

Ali Gökçen wrote:
> However, real programmers do this: ;)
>
> CREATE PROCEDURE PROC_NOVA_SIFRA_GEN(GEN VARCHAR(50))
> RETURNS (SIF BIGINT)
> AS
> begin
>
> execute statement 'select gen_id('||GEN||',1) from rdb$database'
> into :SIF;
>
> if(SIF is not null) then suspend;
>
> WHEN SQLCODE -104 DO
> begin
> execute statement 'CREATE GENERATOR '||GEN;
> execute statement 'select gen_id('||GEN||',1) from rdb$database'
> into :SIF;
> SUSPEND;
> end
>
> end
>
> Don't forget, if more than one user call this proc at the same time
> and there is no GEN named GENERATOR, FB will throw an exception
> because of DUPLICATE Generator name creation. You should commit
> the transaction ASAP if SIF returns as 1.
>
> Regards.
> Ali
>
>
>
> --- In firebird-support@yahoogroups.com, "miki_avramovic"
> <miki.avramovic@g...> wrote:
>
>>Thanks a lot Ali Gökçen!
>>It works correct!
>>
>>With Best Regards!
>>Miki A
>
>
>
>
>
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> 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
>
>
>
>
>
>
>
>
>
>




++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

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