Он отвечает Синтаксическая ошибка (missing operator) in query expression on the executereader
это значение, которое я получаю, когда запускаю запрос.
"Update [Birthdays] set [ID] = 'RH1' where [ID] = 'RH' and [Date] = '1/1/2014' and [Description] = 'New Year's Day'"
Любая ошибка в моем запросе? Заранее спасибо.
Это мой код:
Private Sub DGHolidays_CellEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DGHolidays.CellEnter
Dim Row = DGHolidays.CurrentRow.Index
col1 = DGHolidays.Rows(Row).Cells(0).Value()
col2 = DGHolidays.Rows(Row).Cells(1).Value()
col3 = DGHolidays.Rows(Row).Cells(2).Value()
End Sub
Private Sub DGHolidays_CellValueChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DGHolidays.CellValueChanged
Dim Row = DGHolidays.CurrentRow.Index
Dim ColI = DGHolidays.CurrentCell.ColumnIndex
Dim Col = DGHolidays.Columns(ColI).HeaderText
If con.State = ConnectionState.Closed Then
con.Open()
End If
MessageBox.Show(DGHolidays.Rows(Row).Cells(ColI).Value.ToString())
Dim updatehol As OleDbCommand = New OleDbCommand("Update [Birthdays] set [" & Col & "] = '" & DGHolidays.Rows(Row).Cells(ColI).Value.ToString() & "' where [ID] = '" & col1 & "' and [Date] = '" & col2 & "' and [Description] = '" & col3 & "'", con)
updatehol.ExecuteReader()