Victor Charles
asked on
Help with Query not working in client's PC
Hi,
The following code works on my development computer but when used on clint's computer they receive "No Records Found" message. Any ideas what is cause the issue? message box TestA confirms the table is not empty since no error message, can't figure why it's not working on my client's PC.
Try
Dim SearchCriteria As String = "Substring(AGD, 1,3) IN (" & xyz & " ) AND (" & yx & ")"
MsgBox("TestA" & dtsetLinkAOP6A.Tables(0).R ows.Count)
Dim FilteredDTA As DataTable
Dim DVA As New DataView(dtsetLinkAOP6A.Ta bles(0), SearchCriteria, Nothing, DataViewRowState.CurrentRo ws)
FilteredDTA = DVA.ToTable
MsgBox(FilteredDTA.Rows.Co unt) ' Returns 0
If FilteredDTA.Rows.Count > 0 Then
FilteredDTA.WriteXml(Appli cation.Sta rtupPath + "\AOP6ATemp.xml")
Exit Sub
Else
MsgBox("No Records Found")
Button6.Enabled = False
Label2.Visible = False
End If
Catch
MsgBox(Err.Description)
End Try
Thanks,
Victor
The following code works on my development computer but when used on clint's computer they receive "No Records Found" message. Any ideas what is cause the issue? message box TestA confirms the table is not empty since no error message, can't figure why it's not working on my client's PC.
Try
Dim SearchCriteria As String = "Substring(AGD, 1,3) IN (" & xyz & " ) AND (" & yx & ")"
MsgBox("TestA" & dtsetLinkAOP6A.Tables(0).R
Dim FilteredDTA As DataTable
Dim DVA As New DataView(dtsetLinkAOP6A.Ta
FilteredDTA = DVA.ToTable
MsgBox(FilteredDTA.Rows.Co
If FilteredDTA.Rows.Count > 0 Then
FilteredDTA.WriteXml(Appli
Exit Sub
Else
MsgBox("No Records Found")
Button6.Enabled = False
Label2.Visible = False
End If
Catch
MsgBox(Err.Description)
End Try
Thanks,
Victor
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.