How can I get an idetity field value back after inserting a row into a
table using ADO?
I'm sorry for not checkig this newsgroup for a while. Here is the exampleQuote:> >Never mind. I've already found the answer to this question. Thanks for
> >triing to help anyway.
Dim r As New ADODB.Recordset
On Error GoTo ErrorHandler
queueConnection.Execute "INSERT INTO t_fw_queue (subscription_id,
fw_command) VALUES (0, '" + cmdText.Text + "')"
fw_command_id DESC", queueConnection
commandID = r("Identity")
If I have:
pt_ident integer identity not null,
and I do:
insert point (pt_x, pt_y) values (0, 0)
How do I get the identity back programmatically? I've tried using ADO and
and the recordset I get back has a single field, and it's a NULL.
On the other hand, if I use isql_w, I can get back the proper value for the
How do people handle getting the identity back after an insert via ADO?