steve
New Member
Posts: 1
|
Post by steve on Oct 19, 2020 20:08:23 GMT
Is it possible to get the primary key back from an insert? I tried with these approaches:
dbManager.Insert(company, out long companyID);
But this gives -1 rather than the generated id. The insert method also returns an int, but presumably this is rows affected.
Thanks
|
|
|
Post by echo17 on Oct 23, 2020 12:44:34 GMT
You could run a query after the insert:
SELECT MAX(companyID) AS companyID FROM company
|
|