Create Login Window in C# step by step
Why Stack Overflow recommends it
Stack Overflow users cite it as the tutorial they followed to build a C# login form, usually when asking why the SqlDataAdapter Fill step or the database connection fails.
Recommended by 1 people across 1 different months, 2015 to 2020.
What it is
A 2013 screen-capture tutorial that walks through building a Windows Forms login window in C# backed by SQL Server, using ADO.NET classes like SqlConnection and SqlDataAdapter. It is presented by Vetrivel D as a beginner-level step-by-step exercise.
What people said
Recommends Umy99 · 2015-11 · Stack Overflow · on “Create Login Window in C#”
I was watching this video [this video] . It basically teaches me how to create my own login page using SQL Server. So after following exactly what he did, when I click the submit button I have an error highlighting sda.Fill(dt);. I am pretty new to SQL Server, please advise!
Cites user4853171 · 2015-05 · Stack Overflow · on “C# Login page. SQL Server " sda.Fill(dt); " ERROR”
I was watching this video [this video] . It basically teaches me how to create my own login page using SQL Server. So after following exactly what he did, when I click the submit button I have an error highlighting sda.Fill(dt); . I am pretty new to SQL Server, please advise! My code: SqlConnection con = new SqlConnection(@"Data Source=(LocalDB)\v11.0;AttachDbFilename=C:\Users\Glenntdy\Documents\GlennTeoDB.mdf;Integrated Security=True;Connect Timeout=30"); SqlDataAdapter sda = new SqlDataAdapter("Select Count(*) From Table where Username='"+txtName.Text + "' and Password = '" +txtPassword.Text + "'",con); DataTable dt = new DataTable(); sda.Fill(dt); if (dt.Rows[0][0].ToString() == "1") { this.Hi
Cites Tommy Miyar · 2020-05 · Stack Overflow · on “How Can I Fix Instance Failure Using SQL Database In C#”
I'm doing a login form following this video here: [this video] This is my code: private void button2_Click(object sender, EventArgs e) { this.Close(); } private void button1_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection(@"Data Source=.\\SQLEXPRESS;AttachDbFilename=C:\\Users\\Hp\\Documents\\Data.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"); SqlDataAdapter sda = new SqlDataAdapter("'Select Count (*) From Login Where Username='" + textBox1.Text + "'and Password='" + textBox2.Text + "''" ,con); DataTable dt = new DataTable(); sda.Fill(dt); if (dt.Rows[1][1].ToString() == "1") { this.Hide(); Main ss = new Main(); ss.Show(); } else { MessageBox.Show("