Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't update the &%!#@ field
Message
De
26/09/1997 22:45:09
Larry Long
ProgRes (Programming Resources)
Georgie, États-Unis
 
 
À
26/09/1997 15:52:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00051833
Message ID:
00051910
Vues:
42
>>>>>>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.
>>>>>
>>>>>Just a thought: do you issue 'SELECT memb' before Replace command?
>>>>
>>>>No. But I shouldn't have to when qualifying the field name with the alias--- 'memb.orig'... right?
>>>
>>>Unfortunately, you must. This bug/feature is older than anything else.
>>
>>I just changed the code to select before the replace. No help. I know that in other places in my app I replace in other work areas all the time, so I experimented in the command window just to be sure:
>>
>>USE table1 in 0
>>USE table2 in 0
>>sele table 1
>>replace table2.field1 with "ZZZZZ"
>>
>>This works fine. The table gets updated no problem.
>
>Sometimes it works, sometimes not...
It has been documented that if the current alias is at eof() then the replace othertable.field wont work. I had hoped that they would have corrected that by now.
L.A.Long
ProgRes
lalong1@charter.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform