Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- System.Data.SqlClient.SqlException: 'Incorrect syntax near 'Schools'.'
- sda.Fill(dt);
- SqlConnection con = new SqlConnection(@"Dont want to show my sql connection but it works -lol");
- SqlDataAdapter sda = new SqlDataAdapter(selectCommandText: "Select Count (*) lFrom Schools where Username='" + textBox1.Text + "' and Password='" + textBox2.Text + "' and Security='" + textBox3.Text + "' and SecurityQuestion='" + dropDown.selectedValue + "'", selectConnection: con);
- DataTable dt = new DataTable();
- sda.Fill(dt);
- if (dt.Rows[0][0].ToString() == "1")
- {
- this.Hide();
- Form1 ss = new Form1();
- ss.Show();
- }
- else
- {
- MessageBox.Show("Your Username Or Password Is Incorrect Please Try Again");
- }
- }
Add Comment
Please, Sign In to add comment