Michael Van Canneyt wrote:
And it is exactly why I can't use MySQL, MSSQL: they don't have sequences or
generators. I need the ID  BEFORE I insert the record, not after.

YES!! This is also missing from SQL Server... or at least, using a GUID is complete overkill. The mechanisms SQL Server has for retrieving the last interted identity value are completely unsane too. Yes, they do work, but things get tricky in real world situations. I have no idea how anyone wrote reliable code to insert a record and retern the IDENTITY value prior to SQL Server 2005.

OT: does anyone know of a reliable generator style "atomic" robust multi user friendly auto IDENTITY generation mechanism for SQL Server? I'd love to be able to define one, but I don't think I have seen one yet that *really* works well.


So: Each his taste :-

Generators and "For select .. into .. suspend" are the features I really miss from Interbase/Firebird.

M
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to