Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
View not update base table's index
Message
De
30/10/1998 21:33:51
Larry Long
ProgRes (Programming Resources)
Georgie, États-Unis
 
 
À
30/10/1998 08:17:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00152706
Message ID:
00153118
Vues:
18
>I have a view consisting of 4 tables that updates 1 of the base tables. The view is being used on a form to update 3 fields. The problem is that the view commits the changes correctly but the update tables indexes apparently are not being updated correctly. After the update is made I can go to the base table and see the changes but when attempting to try to do a SQL Select with a Where statment based on the field value, the record is not selected.
>
>If I manually change the field to a different value and back to the changed value it will start working correctly. As a work-around I have had to save the updated value and the OLDVAL of the view and then update the base table with a REPLACE statement with the OLDVAL and then the new value.
>
>Also, if I delete and rebuild the indexes with the new values are then corrected.
>
>VFP5.0b on WIN98 and WINNT.
>
>Thanks,
>myron kirby
If you have the same situation that I had a while ago, the problem is in the way that NT caches data. Apparently, even after you commit your changes using a tableupdate, it seems as if the data does not actually write to the disk. So, if you subsequently issue an SQL or other read table command, NT returns old information.
The way that I force the information to update is to issue
=RLOCK()
UNLOCK
on the tables that were updated using a view. After doing that I always get current information on subsequent reads.
HTH
//:^)
L.A.Long
ProgRes
lalong1@charter.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform