C C CORDON Feb 8, 2005 #1 How can I get the ID (in a autonumber field) for the last added record in access? TIA!
P Paolo Feb 9, 2005 #3 OleDbCommand idCMD = new OleDbCommand("SELECT @@IDENTITY", dbConnection); newID = (int)idCMD.ExecuteScalar(); This worked for me!
OleDbCommand idCMD = new OleDbCommand("SELECT @@IDENTITY", dbConnection); newID = (int)idCMD.ExecuteScalar(); This worked for me!