Protected Sub myGridView_RowDeleting(ByVal sender As Object, ByVal e As GridViewDeleteEventArgs) Handles myGridView.RowDeleting
strSQL = "DELETE FROM typeform WHERE Idtypeform = '" & myGridView.DataKeys.Item(e.RowIndex).Value & "'"
objCmd = New OleDbCommand(strSQL, objConn)
objCmd.ExecuteNonQuery()
myGridView.EditIndex = -1
BindData()
End Sub
มันขึ้น error แบบนี้ค่ะ
Exception Details: System.Data.OleDb.OleDbException: Data type mismatch in criteria expression.
Source Error:
Line 74: strSQL = "DELETE FROM typeform WHERE Idtypeform = '" & myGridView.DataKeys.Item(e.RowIndex).Value & "'"
Line 75: objCmd = New OleDbCommand(strSQL, objConn)
Line 76: objCmd.ExecuteNonQuery()
Line 77:
Line 78: myGridView.EditIndex = -1