Subject RE: [firebird-support] Re: Auto Incrementing field
Author Bahadir ARMAGAN
Thank you all. This worked very well.

-----Original Message-----
From: Richard Pendered [mailto:rpendered@...]
Sent: Wednesday, December 10, 2003 12:39 PM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] Re: Auto Incrementing field


What you need to do is

in your client app issue
select GEN_ID(GEN_TABLE1_ID,1) from rdb$database
assign that value to some integer,
then
insert into TABLE1 (IDFIELD, FIELD2) VALUES ( <value from client>,44)
that should do it.
If you wanted a purely SQL, you could combine these into a stored procedure
which would return the ID value for you. I'll explain if you want me to but
it will be fairly long.




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: http://www.transvaro.com.tr
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]