SQLTeam.com | Weblogs | Forums

Slow filtering SQL Server table

Hi,
I converted an access database to SQL Server.
The code listed below works fine, but the .Filter = strFilter takes about 1.5 seconds, which was not in access (splitted database). The Frontend is still an access database.
How can i solve this?
Tx
regards
Michel

 With rsART
    .ActiveConnection = oConn
    .Open "Articles", oConn, adOpenKeyset, adLockOptimistic
    strFilter = "[Articlenr] = " & Chr(39) & anr & Chr(39)
    .Filter = strFilter
    If .EOF Then
        MsgBox "Item is not entered in Item Description.", vbCritical, "Comment"
        GoTo Proc_Exit
    Else
        My code.......
    End If
End With

Remove the filter .. and do it seperately

or

create index on filter .. called filtered index

1 Like

Tx a lot.