Page 1 of 1

using LAST_INSERT_ID without being provider-specific

Posted: Tue 23 Aug 2005 01:34
by linarms
Hi,

I'm considering purchasing unidirect.net but its usefulness will be limited if I can't get the last inserted primary key back in a generic way. Obviously the query for MySQL is SELECT LAST_INSERT_ID() and for SqlServer it's SELECT @@IDENTITY, but I don't want my application code to even need to check which provider it's using.

Any ideas?

Cheers,

Luke

Posted: Wed 31 Aug 2005 08:11
by Oleg
UniDirect does not process SQL statements for different SQL servers. UniDirect just serves to provide universal data access. In the next versions we plan to work on this issue.