Link to home
Start Free TrialLog in
Avatar of Victor  Charles
Victor CharlesFlag for United States of America

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).Rows.Count)
                       Dim FilteredDTA As DataTable
                        Dim DVA As New DataView(dtsetLinkAOP6A.Tables(0), SearchCriteria, Nothing, DataViewRowState.CurrentRows)
                        FilteredDTA = DVA.ToTable
                         MsgBox(FilteredDTA.Rows.Count) ' Returns 0
                        If FilteredDTA.Rows.Count > 0 Then
                            FilteredDTA.WriteXml(Application.StartupPath + "\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
ASKER CERTIFIED SOLUTION
Avatar of Victor  Charles
Victor Charles
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial