Subject Re: Generators of firebird or our own generator
Author women_lover_best
Hi Adam,

if i call UDf function in a stored procedure,in a transaction..wont
it be thread safe?
--- In, "Adam" <s3057043@y...>
> --- In, "women_lover_best"
> <talbronstien@g...> wrote:
> > Hi,
> > I would like to know whether one should go with generators, or
> > we generate id's using our own function..the latter option will
> > good if we need to migrate to a different database..
> > thks
> > vishy
> Use Generators,
> They are the easy to use, multi-thread, multi-connection and multi-
> transaction safe. The concept is also now included in the SQL
> as "SEQUENCES", Firebird 2 introduces the Get Next Value For
> syntax.
> If you do decide to write your own, you would probably need to
> implement a UDF to get the value, but make sure it is
threadsafe!!!. If
> you are currently implementing another DB, then check whether they
> support the concept.
> Adam