Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CursorAdapter Performance Issue
Message
De
16/03/2003 04:37:52
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00765148
Message ID:
00766282
Vues:
21
Hi Simon,

I believe, you can get exactly the same performance.

I will not go into many details, but here is a hint:
1) Override CursorFill method as follows:
        IF(this.CursorStatus!=0)
            USE IN (this.Alias)
        ENDIF

        USE <base table> IN 0 AGAIN ALIAS (this.Alias)
        SET ORDER TO ...
        this.CursorAttach(this.Alias)
        SELECT (this.Alias)

2) Override CursorRefresh method as follows:
        IF(this.CursorStatus!=0)
            SET KEY TO ... IN (this.Alias)  && limit records for a new current customer
            GO TOP
        ELSE
            ERROR(...)        
        ENDIF

3) Override CursorAttach as follows:
        * todo:  check that cursor is base table
        DODEFAULT(cAlias,...)
        SET KEY TO ... IN (this.Alias)  && limit records for current customer
        GO TOP
        this.SendUpdates=.F. && you don't want to send updates they'll be saved into base table any way
        this.Tables="" && has same effect as this.SendUpdates=.F. unless you provide custom Insert/Update/Delete command
Thanks,
Aleksey Tsingauz.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform