錯誤而OleDb的錯誤:在UPDATE語句
Try
con.Open()
Dim cmd As New OleDbCommand("Select * from customer", con)
cmd.CommandText = " update customer set hr [email protected],min [email protected] "
cmd.Parameters.AddWithValue("@hr", ComboBoxHr.SelectedIndex.ToString())
cmd.Parameters.AddWithValue("@min", ComboBoxMin.SelectedIndex.ToString())
cmd.ExecuteNonQuery()
TwoDigit(ComboBoxHr)
MessageBox.Show("CONRATULATIONS! ...Click the Start button to see the changes")
Catch ex As Exception
MessageBox.Show(ex.Message.ToString())
End Try
工作正常執行下面的代碼,我得到的語法錯誤,如果我刪除「分」的一部分。 可能是什麼原因?
我估計你應該接受AakashM的回答。 – Fionnuala 2010-04-27 15:14:46