Emily C Graham 18.May.11 10:22 AM a Web browser LC LSX LC LSX - All Releases Windows
Is there any way to fetch values from a row which you have just inserted (using LCConnection.Insert)? I'd like to be able to retrieve the primary key for the inserted row. Using sql commands, I'd do my INSERT INTO... and stick SELECT @@IDENTITY AS 'mykey' on the end but I don't see any way of doing this with LSXLC without constructing my own SQL and using Execute.
I suppose I could also do it by getting hold of the last key used, allowing identity insert, then running a loop incrementing the key myself and trying to insert it until I find a key value which doesn't throw an error, but this seems like it would be inefficient.