Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OLDVAL() returns .NULL. question.
Message
De
28/01/2003 07:12:02
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
28/01/2003 06:23:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00746128
Message ID:
00746136
Vues:
18
This message has been marked as the solution to the initial question of the thread.
>Hi!
>
>I have been debugging a problem with Oldval(). On a newly appended record in a row buffered view, that has not been committed yet, when applying OldVal() (in program code) to numeric field that has had a value entered by the user, OldVal() returns .NULL.
>
>Is this correct? OldVal() helps mentions nothing about this and specifies that the function returns a value commensurate with the column's data type.
>
>If I go to the command window and browse the view, OldVal() returns the present value of the field but I assume that browsing the view committed the record hence the old value equals the current value.
>
>Any insight on this will be appreciated.
>
>Many thanks!


It's true. Oldval() for a new uncommitted field is null.
In a row buffered table leaving the row implicitly commits.
PS:Comparisions like if oldval(...) = 0 would fail. Instead nvl(oldval(...),0) works.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform