[Opensource] database IDENTITY columns
Malcolm Wise
malcolm.wise at sde.eu.sony.com
Wed Oct 9 02:06:56 PDT 2002
Hi,
I've seen numerous postings in the archives about auto-incrementing fields,
mainly with regard to using MS SQL Server for the Expresso setup tables, but
I haven't found anything that seems to address the problem that I have. I'm
using Sybase ASE 12.0, which, like MS SQL Server has 'IDENTITY' columns.
The database allocates values for these columns automatically when inserting
new rows. Is anybody using SQL Server or Sybase with Expresso and letting
the database handle the allocation of IDENTITY columns as opposed to using
Expresso's 'auto-inc' facility? With Sybase (and SQL Server I think) you
cannot specify the column name of an IDENTITY column in an INSERT statement,
unless you want the IDENTITY column to have a specific value (in which case
you need to issue a 'SET IDENTITY_INSERT <table-name> ON' first). Having
looked at the JDBCExecutor.add() method, it will automatically include all
fields (except virtual and binary ones) defined in the DBObject in the
generated INSERT statement. Is there currently a way around this that I'm
missing? I'm using 4.1 RC3.
BTW, if it isn't currently supported and people feel that this facility
would be useful, I'll volunteer to do the work!
Cheers,
Malcolm Wise
Technology Manager
Semiconductor & Devices Europe
Tel. +44(0)1256 388864
http://www.semiconductor.sony-europe.com
*************************************************************************
The information contained in this message or any of its
attachments may be privileged and confidential and intended
for the exclusive use of the addressee. If you are not the
addressee any disclosure, reproduction, distribution or other
dissemination or use of this communication is strictly prohibited
*************************************************************************
More information about the Opensource
mailing list