Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6067369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:36:02+00:00 2026-05-23T09:36:02+00:00

I am creating a login form using C# and MySQL. I got stuck in

  • 0

I am creating a login form using C# and MySQL. I got stuck in SQLConnection. It says that the keyword I used is not supported.

This is my code:

        using (var con = new SqlConnection("host=localhost;usr=root;password=admin;db=timekeeping;"))
        using (var cmd = con.CreateCommand())
        {
            con.Open();
            cmd.CommandText = "SELECT count(*) FROM receptionist WHERE username = @username AND password = @password;";
            cmd.Parameters.AddWithValue("@username", username);
            cmd.Parameters.AddWithValue("@password", password);
            var count = (long)cmd.ExecuteScalar();
            return count > 0;
        }

This is the screenshot of the error message:

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:36:03+00:00Added an answer on May 23, 2026 at 9:36 am

    You need to use the correct connection string keywords for MySQL:

    From Connectionstrings.com:

    Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been creating user login form using the various groupcodes, the user login
I am creating a script using Python Mechanize that can login to a website
I'm currently creating a Login form and have this code: string connectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
I'm creating login form using JSF 2.0. Below is the detailed description. When I
I'm creating a login form for vb.net using ms access 2003 as database. But
Hi I'm creating a login form from scratch in c# using 3 tiers. I've
I'm creating a composite widget using UiBinder. The widget is a login form, so
I'm creating a login page. I want to create ASP.NET TextBox controls that have
I am creating a login system for a web application using PHP. My question
I'm creating a website in Ruby on Rails, where users can login using RESTful

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.