Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Proper cursor buffering
Message
De
02/02/1999 17:30:11
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00183097
Message ID:
00183191
Vues:
26
John,

Is GETFLDSTATE(-1) returning all "1"s or NULL?
If NULL, I guess that the pointer for the work area is at EOF().

If "1"s, are you ensuring that the record pointer is on a CHANGED record when GETFLDSTATE(-1) is issued? Sounds like maybe you're not.
You can use GETNEXTMODIFIED() to do this, looping through each *modified* record to inspect it using GETFLDSTATE(-1).

Good luck,

Jim N

>Thanks Jim for replying. My understanding was that since I'm setting table buffering, any changes to any record should be reflected in the GETFLDSTATE(-1) function (shouldn't it?). As far as what I'm doing, let me be little more specific.
>
>I have a table that stores the costs that have been defined for an item for particular customer. Costs are not fixed to an item but depends on customer and item. Now, what I'm doing is when a user decides to "edit" the costs for a customer, I want to display in a grid ALL the items with costs that have been previously defined. Thus, this is the sequence of bringing up this form:
>1. Create a cursor that holds all items available.
>2. Update the cursor with costs that have been previously defined.
>3. Issue =CURSORSETPROP("Buffering",5,"cMycursor") to buffer the cursor.
>4. Present the cursor data to the user for editing via Grid on a form.
>5. Let the user edit the data (edit/define new costs).
>6. Save the data if changes have been made (GETFLDSTATE(-1))
>
>The problem is, after changing the costs on few new items, calling GETFLDSTATE(-1) is returning no changes being made. Since some records have been changed, shoulnd't GETFLDSTATE() return that it did?
>
>>John,
>>
>>How do you "...make changes to the data... initially - using replace or depending on Form ControlSource or some other means? Does the record pointer get moved before you issue GETFLDSTATE() first time?
>>
>>Perhaps the act of changing those records that you initially did REPLACE on moves the record pointer?
>>
>>Good luck,
>>
>>Jim N
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform