Get sequence number after Insert with VB6
127934Mar 3 2005 — edited Jul 10 2008I am struggling with finding a way to get the sequence number assigned to a new record immediately upon Insert. I have a DataGrid bound to a Class and itâs not showing the new sequence number.
I am now considering writing a Stored Procedure with an Out parameter that returns the sequence number after creating the new record. It looks like the best place to get this value is from an After Insert Trigger but how do I get that value back into my stored procedure? Do I assign the sequence number to a global variable and return that value from the Stored procedure?
Is there a better way that I should be doing this?
Vince