If LabOutConnection.State = ConnectionState.Closed Then
LabOutConnection.Open()
End If
Dim sqlStr As String = "select * from NewImportLabChar where Mid([NewImportLabChar]![LabResultString],1,1)='>' or Mid([NewImportLabChar]![LabResultString],1,1)='<' "
Dim dsLab As New DataSet
Dim da As New OleDbDataAdapter
da.SelectCommand = New OleDbCommand(sqlStr, LabOutConnection)
da.SelectCommand.Connection = LabOutConnection
da.SelectCommand.CommandType = CommandType.Text
da.Fill(dsLab, "NewImportLabChar")
Dim drLab As DataRow
Dim intRow As Int16
For Each drLab In dsLab.Tables("NewImportLabChar").Rows
drLab = dsLab.Tables("NewImportLabChar").Rows(intRow)
drLab.BeginEdit()
drLab("LabResult") = GetLabValue(drLab("LabResultString"))
Debug.Print(GetLabValue(drLab("LabResultString")))
drLab.AcceptChanges()
Next
dsLab.Tables("NewImportLabChar").AcceptChanges()
da.Update(dsLab, "NewImportLabChar")
MessageBox.Show(da.Update(dsLab, "NewImportLabChar").ToString)
da.Dispose()
I looped through the datarow and run the application without error. but the record number update is zero.
LabOutConnection.Open()
End If
Dim sqlStr As String = "select * from NewImportLabChar where Mid([NewImportLabChar]![LabResultString],1,1)='>' or Mid([NewImportLabChar]![LabResultString],1,1)='<' "
Dim dsLab As New DataSet
Dim da As New OleDbDataAdapter
da.SelectCommand = New OleDbCommand(sqlStr, LabOutConnection)
da.SelectCommand.Connection = LabOutConnection
da.SelectCommand.CommandType = CommandType.Text
da.Fill(dsLab, "NewImportLabChar")
Dim drLab As DataRow
Dim intRow As Int16
For Each drLab In dsLab.Tables("NewImportLabChar").Rows
drLab = dsLab.Tables("NewImportLabChar").Rows(intRow)
drLab.BeginEdit()
drLab("LabResult") = GetLabValue(drLab("LabResultString"))
Debug.Print(GetLabValue(drLab("LabResultString")))
drLab.AcceptChanges()
Next
dsLab.Tables("NewImportLabChar").AcceptChanges()
da.Update(dsLab, "NewImportLabChar")
MessageBox.Show(da.Update(dsLab, "NewImportLabChar").ToString)
da.Dispose()
I looped through the datarow and run the application without error. but the record number update is zero.