Subject Re: [firebird-support] Auto Incrementing field
Author Jacob Alberty
use a generator and trigger, unfortunately i cannot provide an example
but basicly you put a before insert and new.filed =
gen_id(autoincrementgenerator, 1) in the trigger

Bahadir ARMAGAN wrote:

> I have an integer field that an application increments it each time it
> adds
> a record. But when I run the intances of that application at the same
> time ,
> I get an error because all the instances reading the same last value and
> trying to insert the same incremented value to this unique field.
> What is the general methode that is to be followed for this problem?
> Is it possible to create an autoincrement field as in access databases?
> What if I try to make a field (already have unique recodrs in it)
> autoincrement?
> TRANSVARO Elektron Aletleri San. ve Tic. A.S.
> Address: Fatih Cad. Dereboyu Sok. No:12
> 34660 Halkali - Istanbul - Turkey
> Phone: +90 (212) 473 0100
> Fax: +90 (212) 473 0155
> URL:
> E-Mail: mail@...
> NOT: Bu elektronik posta mesaji gizli olup, ayni zamanda ayricalikli
> olabilir; sartlar ne olursa olsun, gondericinin onceden onayini
> almaksizin,
> baskalarina iletmemeniz, icerigini kopyalamamaniz veya baskalarina
> aciklamamaniz gerekmektedir. Bu mesajin muhatabi degilseniz, bu durumu
> derhal tarafimiza bildirmenizi rica ederiz. Internet ├╝zerinden yapilan
> iletisim guvenli olmayip, verilerin kasten veya tesadufen bozulmasi ve
> virus
> icermesi olasiligi vardir. Ayrica, elektronik posta, resmi olmayan ve
> cogunlukla kisaltilmis bir iletisim yontemidir. Dolayisiyla, burada
> yer alan
> bilgi veya tavsiyelere, gonderici ile ayrica gorusmeden guvenmeniz normal
> sartlar altinda uygun olmayabilir.
> NOTE: This e-mail is confidential and may also be privileged; under no
> circumstances should you forward it, or copy or disclose its contents, to
> any other person without the prior consent of the sender. If you are
> not an
> intended recipient of this e-mail, please notify us immediately. Internet
> communications are not secure and subject to possible data corruption,
> either accidentally or on purpose, and may contain viruses. Furthermore
> e-mail is an informal and often abbreviated method of communication. For
> these reasons, it will normally be inappropriate to rely on any nformation
> or advice contained herein without also discussing it with the sender.
> [Non-text portions of this message have been removed]
> *Yahoo! Groups Sponsor*
> <*>
> To unsubscribe from this group, send an email to:
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
> <>.