Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't update the &%!#@ field
Message
 
À
26/09/1997 15:30:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00051833
Message ID:
00052064
Vues:
41
>This is pertaining to an earlier post to which no one has responded. What I thought was a buffering problem does not now appear to be. The scenario:
>A main form calls another form whose responsibility it is to replace the values of 3 date fields in a record. The problem is, I cannot programmatically set the values at all.
>Using the debugger, I have verified that the pointer is on the correct record, the value of the field to be replaced is as expected before the update attempt, the replacement value is as expected, and the the code:
>'REPLACE memb.orig WITH currentjdate' fires as expected. I have watches on currentjdate and memb.orig. After this code fires THE VALUE DOES NOT CHANGE.
>
>In an effort to narrow down the possibles sources of trouble, I have placed a databound textbox on the form. After updating the value in the textbox manually at runtime, the value is saved, no problem. But it doesn't work in code. I realize that this is a difficult problem to field without seeing all of my code, but does anybody have any idea what is going on? I have written similar code to this hundreds of times before, but this has got me completely stumped. Thanks.
Erik,

Add the IN clause to yor replace command;

REPLACE Memb.Orig WITH currentjdate IN memb

This is necessary because you are selecting that work area befor ethe replace therfore the replace is being scoped to the NEXT 1 reocr in the CURRENT work area which may have no table open or be at EOF(). By adding teh IN Memb to teh replace commmand tyou are scoping the replace commadn in the MemB work area so it will work for you.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform