PB5.31; ADOmate; @@IDENTITY; MS SQL Server;
Posted: Tue Sep 29, 2015 10:53 am
Hello,
as PureBasic does not natively support connection to Microsoft SQL Server nor ORACLE database, I use for a SQL Server connection ADOmate.
When I insert a row into a table leaving ID off cause it is an identity field, how can I get the last number generated.
I tried calling ADOmate_DatabaseQuery with "select @@IDENTITY" after inserting data, but got no correct answer (only type mismatch error).
A convert lead to NULL only.
Does someone ran into this problem before?
Thanks in advance,
regards
as PureBasic does not natively support connection to Microsoft SQL Server nor ORACLE database, I use for a SQL Server connection ADOmate.
When I insert a row into a table leaving ID off cause it is an identity field, how can I get the last number generated.
I tried calling ADOmate_DatabaseQuery with "select @@IDENTITY" after inserting data, but got no correct answer (only type mismatch error).
A convert lead to NULL only.
Does someone ran into this problem before?
Thanks in advance,
regards