我不知道此代码中的错误位置

时间:2015-05-03 16:05:38

标签: mysql sql vb.net visual-studio-2010 visual-studio

尝试

MySqlConn.Open()

        Dim Query = "Select * From venuesdb.cost where EventDate  >= ('" & DateTimePicker1.Text & "') AND =< ('" & DateTimePicker2.Text & "')"
        Command = New MySqlCommand(Query, MySqlConn)
        SQLDataAdapter.SelectCommand = Command
        SQLDataAdapter.Fill(DatabaseDatSet)
        Bindsource.DataSource = DatabaseDatSet
        DataGridView1.DataSource = Bindsource
        SQLDataAdapter.Update(DatabaseDatSet)
        MySqlConn.Close()

    Catch ex As Exception
        MessageBox.Show(ex.Message)

    End Try
    MySqlConn.Dispose()

我一直收到错误,说这里有一个SQL错误'&gt; =('“&amp; DateTimePicker2&amp;”')'

0 个答案:

没有答案