Subject | Generator problem in Firebird |
---|---|
Author | rambabu.piridi@wipro.com |
Post date | 2006-06-15T09:26:11Z |
Hi,
I am using generator with my Firebird database.
1. When there are no records in the database and i am trying to get the
value of the generator, it doesnot return any thing to me.
2. The second one is that I need to get the incremented value of the
generator whenever a new record is inserted in to the database.
When I insert the first record into the database and
trying to get the generator by using select gen_id(testGen,1) from
table1, it returns the value 1.
When I insert one more record in to the same table, the same query
returns two values 2 and 3
If I insert one more record it returns me 3 values 4, 5 and 6.
My requirement is to get a single value whenever a new recor is inserted
and that value should be the next positive integer of the previous
generator value.
Is this possible in Firebird.
Plz post your reply as early as possible
Thanks n Regards,
=============================
Rambabu Piridi.
[Non-text portions of this message have been removed]
I am using generator with my Firebird database.
1. When there are no records in the database and i am trying to get the
value of the generator, it doesnot return any thing to me.
2. The second one is that I need to get the incremented value of the
generator whenever a new record is inserted in to the database.
When I insert the first record into the database and
trying to get the generator by using select gen_id(testGen,1) from
table1, it returns the value 1.
When I insert one more record in to the same table, the same query
returns two values 2 and 3
If I insert one more record it returns me 3 values 4, 5 and 6.
My requirement is to get a single value whenever a new recor is inserted
and that value should be the next positive integer of the previous
generator value.
Is this possible in Firebird.
Plz post your reply as early as possible
Thanks n Regards,
=============================
Rambabu Piridi.
[Non-text portions of this message have been removed]