Just learning a bit of VB and want to search a very simple SQL query as follows:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
firstOrd = txtFirstOrd.Text
Me.OrdersBindingSource.Filter = "select * from orders WHERE firstDate =" & firstOrd
End Sub
Ive just got this executing on a simple button and keep getting this:
Syntax error: Missing operand after 'orders' operator.
Im pretty sure its a quote problem but cant work it out! Any help would be great!
It looks like you are trying to use the filter of a bindingSource. This filter property may include a condition to check on each row of the given bindingSource
I assume
firstOrdwill contain a dateTime value, so may consider having a look at BindingSource.Filter by Date.