Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unruly Control
Message
 
À
02/05/1997 18:12:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00030343
Message ID:
00030718
Vues:
34
>try a replace immed. after the tableupdate? if that works, something isn't set right (bound, etc.)
>
>Dave:
>Your suggestion allowed me to find a work-around that works, but makes absolutely no sense. In my SAVE method in the form's base class, the code snippet below shows how I normally save data:
>
> IF .NOT. TABLEUPDATE(1, .F., aBuffers[nN,1])
> lRollBack = .T.
> ENDIF
>
>Adding the following makes it work:
>
> IF UPPER(aBuffers[nN,1]) = "INVHEAD"
> REPLACE InvHead.CustPKey WITH THIS.txtCustPKey.Value
> TABLEUPDATE()
> ENDIF
>
>If I do not do the hard-coded REPLACE, I get a zero for InvHead.CustPKey. All other saves for all other tables in every other situation works with the generic SAVE routine except for this one. I know the VALUE is set correctly or my work-around wouldn't work. I have un-bound and re-bound the text box. I have deleted and re-created the text box. Nothing works except the above.
>
>I am not at all happy with the work-around: I hate having code like this in a method in my base data entry form class. (I can't put the code in the sub-classed version (the invoice form itself) for reasons I will bore you with only if you insist.) Plus I hate the overhead involved with two TABLEUPDATEs. But at least it allows me to continue to work on the invoice.
>
>If you have *any* idea where to look, I would be, as always, most grateful.
>
>John

John: If I've read the thread correctly, you've checked the value of the txtCustPKey textbox. Is that value in the buffer? If this is the active control when you go to your save procedure (toolbar, button on form, etc.) the txtCustPKey.Value may not be flushed into the buffer. You can check with debug and getfldstate(-1) or several other methods

Barbara
Barbara Paltiel, Paltiel Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform