[Kexi] IDENTITY issues in Sybase
Sharan Rao
sharanrao at gmail.com
Sun Dec 23 23:07:45 CET 2007
Hi everyone,
I've somehow managed to get Sybase ASE running, but I think Sybase tried real
hard to introduce incompatibilities (hopefully not :P ) between Sybase ASE
and Sybase ASA ( in which I tested much of my kexi code :( )
Auto-increment column is available in Sybase ASA as both `AUTOINCREMENT` and
`IDENTITY`. But in Sybase ASE there's only `IDENTITY` ( as afar as I could
find ). Now, the interesting thing about this column is explained in the
following (tinied) link:
http://tinyurl.com/25ltr9
There is a similar option, identity_update which needs to be set/reset before
updating an IDENTITY column.
Now, the issues :
1. It needs the field list to be specified in every INSERT statement which
inserts an explicit value into the IDENTITY column. This is currently not
done in Kexi for some `INSERT INTO` queries. Trivial to add,I assume. Shall
I ?
2. I need to set/unset the options, `identity_insert` and `identity_update`,
before Inserting / Updating respectively, and turn them off immediately after
the respective query. ( these options need to be set per table).
Given the fact, that I only have the SQL query string, when I get one of
these `execute` queries in the driver code, I guess the right way to proceed
is to use the KexiDB::Parser class for getting the operation, tableschema
etc. . (or is there a better method ? ).
Thanks in advance for any suggestions :)
Cheers and Merry Christmas to one and all :)
Sharan Rao
More information about the Kexi
mailing list