当我尝试通过 SQL Server 获取插入数据库的最后一个 ID 时,它返回 __Page。这是我的代码:
query = "INSERT INTO
seekers(name, sname, lname, status, gender, dob, major, experince,
email, password, phone, valid, city)
values (@name, @sname, @lname, @status ,@gender, @dob, @major,
@exp, @email, @password, @phone, 0, @city);
SELECT SCOPE_IDENTITY();";
// some code here related to parameters
command = new SqlCommand(query, connection);
int id = Convert.ToInt32(command.ExecuteScalar());