Hi everyone!
I Have a question.. what is my error in the following query?
In my combobox1 have a user and in the other combobox have a date..Code:Dim sql As MySqlCommand = New MySqlCommand("SELECT * FROM idtime WHERE user_name = '" & ComboBox1.Text & "AND register_date = " & Convert.ToDateTime(ComboBox2.Text).ToString("yyyy-MM-dd") & "'", con)
If I use a individual query for each one work:
But the problem is maybe in the "AND" statement..Code:Dim sql As MySqlCommand = New MySqlCommand("SELECT * FROM idtime WHERE user_name = '" & ComboBox1.Text & "'", con)
Help!!
Best Regards!!![]()




Reply With Quote
