Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Password CAPS not Checking in my code

Password CAPS not Checking in my code

Scheduled Pinned Locked Moved C#
databasemysqltutorialquestion
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    N Mohamed rafi
    wrote on last edited by
    #1

    I saved my password in CAPS includes but if i enter in small letters its also logged in how to change it?

    private void button14_Click(object sender, EventArgs e)
    {
    if (textBox9.Text != "" && textBox10.Text != "")
    {
    string connectionString;
    MySqlConnection cnn;
    connectionString = @"Data Source=localhost;Initial Catalog=testDB;User ID=root;Password=mysql";
    cnn = new MySqlConnection(connectionString);
    string id = textBox9.Text;
    string password = textBox10.Text;
    textBox9.Text = "";
    textBox10.Text = "";
    string query = "select count(*) from login where userid=@userid and password=@password";
    using (MySqlCommand cmd = new MySqlCommand(query))
    {
    cmd.Parameters.AddWithValue("@userid", id);
    cmd.Parameters.AddWithValue("@password", password);
    cmd.Connection = cnn;
    cnn.Open();
    cmd.ExecuteNonQuery();
    int result = Convert.ToInt32(cmd.ExecuteScalar());
    DialogResult dr = MessageBox.Show("Are you sure to Login now?", "Confirmation", MessageBoxButtons.YesNo);
    if (dr == DialogResult.Yes && result > 0)
    {
    MessageBox.Show("Login Successfully");
    cnn.Close();
    this.Hide();
    Form2 f2 = new Form2();
    f2.ShowDialog();
    }
    else
    {
    MessageBox.Show("Login Failed");
    }
    }
    }
    else
    {
    MessageBox.Show("Please Enter Correct Login details");
    }

        }
    }
    
    OriginalGriffO 1 Reply Last reply
    0
    • N N Mohamed rafi

      I saved my password in CAPS includes but if i enter in small letters its also logged in how to change it?

      private void button14_Click(object sender, EventArgs e)
      {
      if (textBox9.Text != "" && textBox10.Text != "")
      {
      string connectionString;
      MySqlConnection cnn;
      connectionString = @"Data Source=localhost;Initial Catalog=testDB;User ID=root;Password=mysql";
      cnn = new MySqlConnection(connectionString);
      string id = textBox9.Text;
      string password = textBox10.Text;
      textBox9.Text = "";
      textBox10.Text = "";
      string query = "select count(*) from login where userid=@userid and password=@password";
      using (MySqlCommand cmd = new MySqlCommand(query))
      {
      cmd.Parameters.AddWithValue("@userid", id);
      cmd.Parameters.AddWithValue("@password", password);
      cmd.Connection = cnn;
      cnn.Open();
      cmd.ExecuteNonQuery();
      int result = Convert.ToInt32(cmd.ExecuteScalar());
      DialogResult dr = MessageBox.Show("Are you sure to Login now?", "Confirmation", MessageBoxButtons.YesNo);
      if (dr == DialogResult.Yes && result > 0)
      {
      MessageBox.Show("Login Successfully");
      cnn.Close();
      this.Hide();
      Form2 f2 = new Form2();
      f2.ShowDialog();
      }
      else
      {
      MessageBox.Show("Login Failed");
      }
      }
      }
      else
      {
      MessageBox.Show("Please Enter Correct Login details");
      }

          }
      }
      
      OriginalGriffO Offline
      OriginalGriffO Offline
      OriginalGriff
      wrote on last edited by
      #2

      There is no point in answering this: you haven't listened to a thing we said in reply to any of your other questions: you are just copy'n'pasting junk code without thinking about it at all and relying on others to fix it for you. You aren't learning anything from us; you aren't even trying. All you are doing is becoming a Help Vampire who wastes our time. Go away, get a book, and start learning how to code properly: copy'n'paste'n'hope is not a valid development method.

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
      "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

      N 1 Reply Last reply
      0
      • OriginalGriffO OriginalGriff

        There is no point in answering this: you haven't listened to a thing we said in reply to any of your other questions: you are just copy'n'pasting junk code without thinking about it at all and relying on others to fix it for you. You aren't learning anything from us; you aren't even trying. All you are doing is becoming a Help Vampire who wastes our time. Go away, get a book, and start learning how to code properly: copy'n'paste'n'hope is not a valid development method.

        "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!

        N Offline
        N Offline
        N Mohamed rafi
        wrote on last edited by
        #3

        ok provide solution and article link pls

        OriginalGriffO D 2 Replies Last reply
        0
        • N N Mohamed rafi

          ok provide solution and article link pls

          OriginalGriffO Offline
          OriginalGriffO Offline
          OriginalGriff
          wrote on last edited by
          #4

          Again, you are ignoring everything we tell you ...

          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!

          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
          "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

          1 Reply Last reply
          0
          • N N Mohamed rafi

            ok provide solution and article link pls

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            You've already been given those links, and you're STILL ignoring them.

            Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
            Dave Kreskowiak

            N 1 Reply Last reply
            0
            • D Dave Kreskowiak

              You've already been given those links, and you're STILL ignoring them.

              Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
              Dave Kreskowiak

              N Offline
              N Offline
              N Mohamed rafi
              wrote on last edited by
              #6

              Please provide solution or idea

              D 1 Reply Last reply
              0
              • N N Mohamed rafi

                Please provide solution or idea

                D Offline
                D Offline
                Dave Kreskowiak
                wrote on last edited by
                #7

                All this time and you still don't get it. You've already been given all the links to read to figure this out. You just refuse to do the work yourself.

                Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
                Dave Kreskowiak

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups