Table with 2000 records. How to find with more speed?

Discussion in 'Questions (Windows Mobile)' started by faustinofaria, Mar 24, 2008.

  1. faustinofaria

    faustinofaria New Member Licensed User

    Hello Friends.

    My table have 1500 lines and 4 columns.

    How to search a line in a table with more speed?

    I'm using:

    For i=0 to tbTable.RowCount-1
    If tbTable.Cell( "MyKey" , i ) = sKey Then
    ...... My Code....
    End If
    Next

    But it is too much slow.

    Can you help me, please?

    Thanks.

    Sorry my poor english. I'm a Brazilian user.
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    You should use the Filter method:
    Code:
    tbTable.Filter("MyKey = '" & sKey & "'")
    For i=0 to tbTable.RowCount-1
        
    If tbTable.Cell( "MyKey" , i ) = sKey Then
           ...... My Code....
        
    End If
    Next
     
Loading...