Author: Rameezwaheed | Posted on: 12/31/2008 11:36:39 PM | Views : 298

Hi all ,

iam getting the above error when iam reading data using Reader can any body tell me what iam doing wrong .

Here is code  


public bool CheckCredentials(string Username, string Password)
{
    objConn.Open();
    objCmd = new OleDbCommand("SELECT User_Name, Pass FROM Users WHERE User_Name=@givenUsername", objConn);
    objCmd.Parameters.AddWithValue("@givenUsername", Username);
    objDR = objCmd.ExecuteReader();
    if (!objDR.Read()) {
        return false;
    }
    else {
        string ...

Go to the complete details ...