I Suspect that you want to get the total Count
of users with the given UserName
.
if you want to get the Count
you need to follow the follwoing SELECT
command Syntax:
SELECT COUNT(*) from [TableName] WHERE CNDITION;
SO you are missing Count(*) in your SELECT Statetement.
Replace This:
anc.CommandText = "Select * From Logins where User_name = @usr";
With This:
anc.CommandText = "Select count(*) From Logins where User_name = @usr";