Hello Imre I am using firebird already for 3 years, but now I am switching from Borland VCL to VS .NET 2.0 technoligies.
I think autoincrement fields and your propusal are fine for local, single user databases, like a firebird embedded database. In a multi user envirement, two users can insert the same key in the data set in the memory. When updating the data set to the database, the later will get an error. The only safe way to get a real unique id in a multi user envirement is to use a generator. Chris ----- Original Message ----- From: "Balla Imre" <[EMAIL PROTECTED]> To: "For users and developers of the Firebird .NET providers" <[email protected]> Sent: Friday, August 18, 2006 3:38 PM Subject: Re: [Firebird-net-provider] DDEX stored procedure problem >I forgot about your second question. :-) > > If I don't use difficult generators, then I don't use them at all. > > I mean if I want to get an autoincrement number for every record, I > personally prefer to use something like: > insert into table (id, field1, field2) select coalesce(max(id) + 1, > 1), @field1, @field2 from table > and then add parameter values. > > Much simplier and easier. But only works after 1.5 > > Imre > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Firebird-net-provider mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider > > __________ NOD32 1.1713 (20060817) Information __________ > > Diese E-Mail wurde vom NOD32 antivirus system geprüft > http://www.nod32.com > > ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Firebird-net-provider mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
