刚学了一点VB,想搜索一个很简单的SQL查询如下:
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
我刚刚在一个简单的按钮上执行了这个并继续得到这个:
Syntax error: Missing operand after 'orders' operator.
我很确定这是一个报价问题,但无法解决!任何帮助都会很棒!