is there anyway do retrieve the value of a Autoincrement field after
using the Execute command of the TDatabase without opening a table or a
query ?
Thanks,
Bruno
That depends on what database you are using.
--
Brian Bushay (TeamB)
Bbu...@NMPLS.com
>Paradox
>
>Brian Bushay TeamB wrote:
>>>is there anyway do retrieve the value of a Autoincrement field after
>>>using the Execute command of the TDatabase without opening a table or a
>>>query ?
--
Brian Bushay (TeamB)
Bbu...@NMPLS.com
Similar problem for me; but I'm using Sybase Adaptive Server Anywhere 9.
I wonder if it is possible to create a construct like
"SELECT Table.IDRow FROM (INSERT INTO Table (Rows) VALUES (Values))"
if not even executing the INSERT command using an ADOQuery might work.
a) If the table contains an auto-increment field, and the database server
inserts values always increasing, you may
- INSERT
- SELECT {TOP 1 | FIRST} ... ORDER BY ID DESC
b) If the server supports trigger, you may trigger the creation of datasets
and send the new ID value somewhere...
The InterBase/FireBird manual contains a similar approach because
auto-increment fields must be implemented using "generators" there.
"Mario *LigH* Rohkrämer" <m.rohk...@true-professionals.de> schrieb im
Newsbeitrag news:417f...@newsgroups.borland.com...