Hi i have the following which should be checking if a value exists in the database, however it is not working in the correct fashion, this is what i have in my data access layer;
public bool CheckUserNameAvailability(string UserName)
{
try
{
bool userExists = false;
int i = 0;
SqlCommand command = new SqlCommand("Users_CheckUsername", conn);
command.Parameters.Add("@UserName", SqlDbType.VarChar).Value = this._UserName;
command.CommandType = CommandType.StoredProcedure;
conn.Open();
i = command.ExecuteNonQuery();
...
Go to the complete details ...