WHERE (not Santa) clause question..
This block of code is executing perfectly without the WHERE clause inserted at the end of the dim statement; yet when it's there, the datagrid doesn't fill in and appear. Any ideas?
Thanks much....Troy
Private Sub btnGI_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnGI.Click
Select Case ddlF002.SelectedIndex()
Case 0
Dim myQuery As String = "SELECT * FROM [tbl * F002 > 4 J] WHERE MUFLID =" & Chr(39) & ddlWho.SelectedItem.Text & Chr(39)
OleDbConnection1.Open()
Dim cmd As New OleDb.OleDbCommand()
cmd.Connection = OleDbConnection1
cmd.CommandText = myQuery
Dim datareader As OleDb.OleDbDataReader = cmd.ExecuteReader(CommandBehavior.CloseConnection)
dgF002.DataSource = datareader
dgF002.DataBind()
Case 1
'another SQL statement w/ a WHERE clause
Case 2
'another SQL statement w/ a WHERE clause
Case 3
'another SQL statement w/ a WHERE clause
End Select
End Sub