SqlCommand cmd = new SqlCommand("SELECT IDENT_CURRENT('Orders')", cn); pid = (int)cmd.ExecuteScalar();
"SELECT IDENT_CURRENT('Orders')
DBCC CHECKIDENT (‘tablename’, NORESEED)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)