Subject | Re: [ib-support] using Gen_id from a stored proc |
---|---|
Author | Fabricio Araujo |
Post date | 2001-03-24T16:56:28Z |
On Thu, 22 Mar 2001 14:40:23 +1100, Helen Borrie wrote:
quite similar arguments to justify it.
That's why I love mailing lists. :-)
Systems Developer
>At 12:34 PM 21-03-01 -0600, you wrote:(snip)
>>I am trying to write a simple stored proc that returns the results of
>>running Gen_Id. I am trying to use this code:
>>
>> Create Procedure GeneratePrimaryKey
>> Returns ("PK" Integer )
>> As Begin
>> "PK" = Gen_Id( PrimaryKeyGenerator, 1 );
>> End !!
>> Set Term ; !!
>>
>>I execute this code using both of these:
>>
>> Execute Procedure GeneratePrimaryKey
>Curious... You and AnnH seems to disagree strongly in this question. The thing that make it funny is that you both use
>btw, don't write a procedure that performs its own increment on Gen_ID(GeneratorName,0) as suggested by somebody. This is unsafe and totally defeats the point
>of using a generator which is (a) to ensure that PK values are unique and (b) to keep the appointment of numbers for primary key assignments outside transaction
>control.
quite similar arguments to justify it.
That's why I love mailing lists. :-)
>[]s Fabricio
>Cheers,
>Helen
>
>All for Open and Open for All
>InterBase Developer Initiative ยท http://www.interbase2000.org
>_______________________________________________________
>
>
>To unsubscribe from this group, send an email to:
>ib-support-unsubscribe@egroups.com
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
Systems Developer