Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setrecnum()
Message
De
21/08/2002 01:40:42
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Titre:
Setrecnum()
Divers
Thread ID:
00691776
Message ID:
00691776
Vues:
56
Hi,


In version 7.0 of the framework an new method Setrecnum() was added to be used with VFP cursors.
When you work with a filter (SET FILTER TO) and you would want the record pointer to go to let's say the 7th record in the filtered set, it is very possible (this is the case if in the original table some records between the first and 7th record were filtered out) that by using this method, the recordpointer would not point at the 7th record in the filtered set but at the 7th record of the not filtered 'base' table'.

I would like to avoid this behaviour by using the following code:

LPARAMETERS tiRecNum

LOCAL loSelect

loSelect = CREATEOBJECT("CSelect",This.GetAlias())
GOTO TOP
SKIP (tiRecnum-1)


Does anyone know another solution without changing the framework?


Mark



NB: Current code:
*---------------------- Location Section ------------------------
* Library: Cdataenv.vcx
* Class: Ccursor
* Method: Setrecnum()
*----------------------- Usage Section --------------------------
*) Description:
*) Moves the record pointer to the specified record number

* Scope: Public
* Parameters:
* 1. tiRecNum - Record number
*$ Usage:
*$
* Returns: Logical .T. by default
*--------------------- Maintenance Section ----------------------
* Change Log:
* CREATED 09/20/01 - KJM
* MODIFIED
*-----------------------------------------------------------------
LPARAMETERS tiRecNum

LOCAL loSelect

loSelect = CREATEOBJECT("CSelect",This.GetAlias())
GOTO tiRecNum
If everything seems to be going well, you obviously don't know what the hell is going on !
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform