Click here to Skip to main content
15,921,210 members
Home / Discussions / C#
   

C#

 
GeneralRe: Webbrowser control + com visable functions Pin
Not Active29-Jan-08 8:29
mentorNot Active29-Jan-08 8:29 
GeneralRe: Webbrowser control + com visable functions Pin
Spacix One29-Jan-08 9:40
Spacix One29-Jan-08 9:40 
GeneralRe: Webbrowser control + com visable functions Pin
Not Active29-Jan-08 14:32
mentorNot Active29-Jan-08 14:32 
GeneralRe: Webbrowser control + com visable functions Pin
Spacix One30-Jan-08 4:52
Spacix One30-Jan-08 4:52 
GeneralRe: Webbrowser control + com visable functions Pin
Not Active30-Jan-08 5:01
mentorNot Active30-Jan-08 5:01 
GeneralRe: Webbrowser control + com visable functions Pin
Spacix One30-Jan-08 5:39
Spacix One30-Jan-08 5:39 
GeneralRe: Webbrowser control + com visable functions Pin
Not Active30-Jan-08 5:46
mentorNot Active30-Jan-08 5:46 
GeneralHelp with User Validation Pin
MumbleB29-Jan-08 5:52
MumbleB29-Jan-08 5:52 
Hi guys. I have the below code but am having problems with compiling the code. I get the following error when compiling the code. I know where the error is but do not know how to fix it. Can somebody please advise?

The error message is as follows:

"Operator '==' cannot be applied to operands of type 'method group' and 'bool'"

private void btnCancel_Click(object sender, EventArgs e)
{
    this.Close();
    this.Dispose();
}

OleDbConnection conn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=W:\CS Call Info\MobEmail.mdb");
OleDbCommand cmd;

private void btnLogon_Click(object sender, EventArgs e)
{
    //Connection Code
    string sql = "SELECT UserName,Password FROM Users WHERE UserName = '"
        + txtboxUserName.Text + "' AND Password = '" + txtboxPassword.Text + "'";
    OleDbCommand cmd = new OleDbCommand(sql, conn);
    OleDbDataReader dr = cmd.ExecuteReader();

    try
    {
        //Open the Connection
        conn.Open();
    }
    catch (InvalidOperationException ex)
    {
        MessageBox.Show(ex.Message.ToString());
    }

    try
    {
        //Read Database
        if (dr.Read == false) //This is where the error is
        {
            MessageBox.Show("Invalid Username And Or Password Supplied", "Logon Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
        }

        else
        {
            this.DialogResult = DialogResult.OK;
        }
    }
    catch (Exception ex)
    {
        MessageBox.Show(ex.Message.ToString());
    }
    if (conn.State != ConnectionState.Closed)
    {
        conn.Close();
    }

GeneralRe: Help with User Validation Pin
led mike29-Jan-08 5:58
led mike29-Jan-08 5:58 
GeneralRe: Help with User Validation Pin
MumbleB29-Jan-08 6:29
MumbleB29-Jan-08 6:29 
GeneralRe: Help with User Validation Pin
Giorgi Dalakishvili29-Jan-08 6:04
mentorGiorgi Dalakishvili29-Jan-08 6:04 
GeneralRe: Help with User Validation Pin
led mike29-Jan-08 6:38
led mike29-Jan-08 6:38 
QuestionSimulating SHIFT+MOUSE_RIGHT_CLICK ? Pin
Mike Curry - Canada29-Jan-08 5:09
Mike Curry - Canada29-Jan-08 5:09 
GeneralRe: Simulating SHIFT+MOUSE_RIGHT_CLICK ? Pin
Mike Ellison29-Jan-08 5:43
Mike Ellison29-Jan-08 5:43 
GeneralRe: Simulating SHIFT+MOUSE_RIGHT_CLICK ? Pin
Bekjong29-Jan-08 6:35
Bekjong29-Jan-08 6:35 
AnswerRe: Simulating SHIFT+MOUSE_RIGHT_CLICK ? Pin
Spacix One29-Jan-08 6:39
Spacix One29-Jan-08 6:39 
GeneralRe: Simulating SHIFT+MOUSE_RIGHT_CLICK ? Pin
Skippums29-Jan-08 7:56
Skippums29-Jan-08 7:56 
GeneralRe: Simulating SHIFT+MOUSE_RIGHT_CLICK ? Pin
Mike Curry - Canada29-Jan-08 9:55
Mike Curry - Canada29-Jan-08 9:55 
GeneralRe: Simulating SHIFT+MOUSE_RIGHT_CLICK ? Pin
Skippums29-Jan-08 10:36
Skippums29-Jan-08 10:36 
GeneralRe: Simulating SHIFT+MOUSE_RIGHT_CLICK ? Pin
led mike29-Jan-08 11:02
led mike29-Jan-08 11:02 
QuestionORM and Obfuscation Pin
gentyjp29-Jan-08 4:10
gentyjp29-Jan-08 4:10 
GeneralRe: ORM and Obfuscation Pin
Mark Churchill29-Jan-08 18:12
Mark Churchill29-Jan-08 18:12 
Questionhow to display MsWord document in my app ? Pin
hdv21229-Jan-08 4:00
hdv21229-Jan-08 4:00 
AnswerRe: how to display MsWord document in my app ? Pin
Mike Ellison29-Jan-08 5:48
Mike Ellison29-Jan-08 5:48 
GeneralConnect to a printer with a C# service Pin
chrpet29-Jan-08 3:55
chrpet29-Jan-08 3:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.