hi i having trouble with ExecuteScalar(),
[1]I getting a null reference exception that was un handled by me.
[2] use the keyword 'new' to create an object instance, but when i add new i get:
Object reference not set to an instance of an object.
Here are some lines of code, any suggestions, thanks:
Command.Parameters.Add("@pass", SqlDbType.NVarChar).Value = strPassword;
connection.Open();
int va1 = (int)Command.ExecuteScalar();
Console.WriteLine(va1);
connection.Close();
[1]I getting a null reference exception that was un handled by me.
[2] use the keyword 'new' to create an object instance, but when i add new i get:
Object reference not set to an instance of an object.
Here are some lines of code, any suggestions, thanks:
Command.Parameters.Add("@pass", SqlDbType.NVarChar).Value = strPassword;
connection.Open();
int va1 = (int)Command.ExecuteScalar();
Console.WriteLine(va1);
connection.Close();