I'm executing a query in vb.net inserting a row into an sql server 2008 table. The table has a unique id column that auto increments on each insert. How do i get the value of the id created on the last insert. What I need is equivalent to mysql_insert_id(); in php and mysql, but I need it for vb.net and sql 2008. I'm not using a stored procedure. It an insert query directly in vb.net.
Any help would be much appreciated. I've scoured the world wide web but I haven't been able to find the answer.
Any help would be much appreciated. I've scoured the world wide web but I haven't been able to find the answer.