I have this code in my application
SqlConnection sqlConnection1 = new SqlConnection(connectionString);
SqlCommand cmd = new SqlCommand();
cmd.CommandType = System.Data.CommandType.Text;
sqlConnection1.Open();
cmd.CommandText = "SELECT S2 FROM CDUSR WHERE N100 = " + N100.ToString() ;
var HashStr = cmd.ExecuteScalar();
sqlConnection1.Close();
When I reach at the line
var HashStr = cmd.ExecuteScalar();
Visual Studio 2015 stops debugging my application without any error.
connectionString contains a valid connection string (I have tested)
This query SELECT S2 FROM CDUSR WHERE N100 = 6369 executes successfully in SSMS.
I want to know what the problem is. S2 contains the following string:
a4sd4545ag5645sdfa55sdf45fv5er5cfvg5s45