Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Curval() and oldval() problems
Message
 
 
À
13/06/2014 22:49:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01601839
Message ID:
01601979
Vues:
27
Here's what I'm doing:
use table1
set multilocks on
lStatus = cursorsetprop("buffering",5,"table1")
then I open the debugger, set curval() and oldval() to a field in the table.
I browse the table and make a change to the field. Nothing happens in the debugger.
If i change a record and return to the record, curval still shows old value.
I can close and reopen the browse and it still shows the new value, but curval is still out of time.
I can run a sql statement against the table, with the "with (buffering=.t.)" statement and I get the new value.
getnextmodified does show the record(s) changed,but moving to those records doesn't help the curval situation as it still just shows the old value.
If I issue a tableupdate, magically curval and oldval update to the new value.

So....is curval just not supported on a browse? It also seemed to be happening when I have the table open in a grid and make a change, which is how I found this problem to begin with.

I have found the workaround to my problem by running a sql statement against it and comparing, but it seems that curval & oldval should be more helpful here.

>Take a look at the GeteNextModified() example in VFP9 help. When you are on a modified record, you should see oldval() and curval() reflect the correct values, providing you are using Optimistic buffering.
>
>Hank
>
>>I am struggling with a buffering problem and know there must be a switch somewhere I"m missing and hoping it's not a bug:
>>
>>1. open a table within my program, set multilocks on, set cursorsetprop("buffering",5,"mytable")
>>2. set the curval("myfield","mytable") and oldval("myfield","mytable") up in debug window.
>>3. Make a change and move fields and/or records. The data doesn't show a change in the curval() function.
>>if I issue a tableupdate command, then everything updates correctly.
>>
>>do the curval and oldval functions not work in a browse or grid? Is there another switch/function I'm missing to make this work?
Steve Howie, owner
DaSH Technology
Denver, CO
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform