Buy Support
Incidents |
If you can't find your answer
in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us
private or confidential information: |
Click Here
|
If you can't
login and post questions or you are having trouble viewing forum posts:
Click Here
|
Callback
Support |
If you live in USA, UK, Canada, Australia or New
Zealand, you can leave us details on your question and request us to call you back and discuss
them with you personally (charges apply). |
Click Here
|
Buy Support
Incidents |
If you can't find your answer
in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us
private or confidential information: |
Click Here
|
|
How do I get the new ID from an insert command I just inserted? |
Author |
Message |
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2006-02-21 19:55:51 |
You simply execute the QODBC LastInsertID stored procedure without breaking the current connection:
SP_LASTINSERTID tablename
Where tablename is the table that you just did the insert in.
SP_LASTINSERTID returns a recordset of 1 row and 1 column that is the ListID/TxnID of the last record inserted on that table in the current connection. The value returned is the ListID or TxnID of the last inserted record for that table on the current connection. Its value is NULL if a record has not been inserted into the requested table on the current connection. |
|
|
|
|