I am using below SQL Server function to check is userName
and password
entered by user through C# windows forms are correct or not as show below too but at first I am getting error at line cmd.ExecuteScalar();
saying
{"Object reference not set to an instance of an object."}
after trying to handle that error I get the error on
return result.ToString();
How I am getting null value if the SQL Server function not returning null value it return 1 or -1 if there is no match within the database?
Even so I searched and tried to handle the null value returned from the cmd.ExecuteScalar();
as you can see my tries but none of the gose successfully
please if anyone can help me ...thanks