Retrieving the last inserted ID using scope_Identity()
问题 I am trying to get the last ID inserted using the SCOPE_IDENTITY but I got an error. I am using SQL server 2012 with Visual Studio Express 2013 Here is my code protected void PerformInscription(string sEmail, string sPassword,string sName) { bool buserIdAuthenticated = false; string salt = null; string passwordHash = pwdManager.GeneratePasswordHash(txtPassword.Text, out salt); SqlConnection sqlConnection; sqlConnection = new SqlConnection(); try { sqlConnection.ConnectionString =