The "Preview Data" shows that the code is connected to the Access data base(it displays the data correctly). The code runs fine with no errors reported. The MsgBox statement shows all data is correctly read from the data base, but the boolean is never updated to "True". No error is caught by the "Try" function. The tool tips seem to show that "tbl01" is an alias for the MarkBox data set. (By the way, that is "tbl" with a small "L" followed by "01".) I would appreciate any help in locating the problem.
CODE
Private Sub btnGoMark_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGoMark.Click
Dim strX as String
Dim MarkBoxDataSet As New DataSet
Dim tbl01 As New MarkBoxDataSet.ColorsDataTable
ColorsTableAdapter.Fill(tbl01) 'get the data
tbl01.PrimaryKey = New DataColumn() {tbl01.Columns(0)}
Dim MyRow As DataRow
Dim NewRow(3) As Object
Try
MyRow = tbl01.Rows.Find(intIndex)
If MyRow Is Nothing Then
MsgBox("Could not find row match.")
Exit Sub
Else
NewRow(0) = MyRow.Item(0)
NewRow(1) = MyRow.Item(1)
NewRow(2) = MyRow.Item(2)
NewRow(3) = True
tbl01.BeginLoadData()
tbl01.LoadDataRow(NewRow, True)
tbl01.EndLoadData()
Me.ColorsTableAdapter.Update(Me.MarkBoxDataSet.Colors)
End If
strX = CType(NewRow(0), String) & "," & NewRow(1) & "," & NewRow(2) & "," & CType(NewRow(3), Boolean)
'MsgBox(strX)
tbxDone.Text = "Done"
Catch
tbxDone.Text = "Not Done"
End Try
End Sub