M
Micheal
The below code does _not_ work! The datatype for the autoincrement value is
INT in SQL Server 2000. The strange thing is that if I use a 'decimal' it
works (using .NET framework 1.1)
---------------------------------------------------------
string sql = "insert into sports (name) value ('test'); select @@identity";
conn.Open();
SqlCommand cmd = new SqlCommand(sql, conn);
int result = (int)cmd.ExecuteScalar();
INT in SQL Server 2000. The strange thing is that if I use a 'decimal' it
works (using .NET framework 1.1)
---------------------------------------------------------
string sql = "insert into sports (name) value ('test'); select @@identity";
conn.Open();
SqlCommand cmd = new SqlCommand(sql, conn);
int result = (int)cmd.ExecuteScalar();