Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Apr 06, 2012 06:07 PM|LINK
ur code also removed the error but it also gave me a runtime error
unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Violation of PRIMARY KEY constraint 'PK_info'. Cannot insert duplicate key in object 'dbo.info'.
The statement has been terminated.
Line 29: cmd.Parameters.AddWithValue("@second", TextBox2.Text);
Line 30: //SqlCommand myCom=new SqlCommand(st,con);
Line 31: int numrow = cmd.ExecuteNonQuery(); Line 32: con.Close();
Line 33: }