What is the best way to retrieve the primary key of an inserted row, when using ODBC objects in .NET?
For example (VB):
Dim command As OdbcCommand = gOdbcConn.CreateCommand()
command.CommandText("INSERT INTO auhinode (node_key, node_desc) VALUES (0, 'New Node')")
...
Dim result As Integer = command.ExecuteNonQuery()
I've seen a couple of other suggestions here, but I'm wondering if there's solutions specific to the ODBC objects?
Edit: The reason we're using ODBC, is because we support 3 different databases - SQL Server, Oracle, Informix.