Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
View Bug (reprise)
Message
De
05/02/1999 13:58:47
Eric Barnett
Barnett Solutions Group, Inc
Sonoma, Californie, États-Unis
 
 
À
05/02/1999 10:34:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00184361
Message ID:
00184462
Vues:
23
Are you adding records to the view with APPEND BLANK? If so you will get BLANK values (i.e. 0 for a numeric field) instead of the .NULL. you might expect. You have to either specify the .NULL. programmatically, or use a default in the view.

This is one of those cases where VFP doesn't behave like SQL server (which will insert .NULL. for all blank values) but probably should. It's probably this way because DBFs got NULL support late and assuming .NULL. might break a lot of older apps.

INSERT - SQL will cause the same problem if you don't explicitly set the value of the field to .NULL.

>(I posted this yesterday, but it might have got lost in the mix - so here goes again)
>
>Ok - noticed a behavior today that I had missed before. I have a table with integer fields. These accept .NULL. values but I did NOT set them up to default null. I also have a view that updates this table. The corresponding view fields to those integer table fields ARE set up to default to .NULL. in the view.
>
>Problem/Bug: If I insert new record in view, the fields correctly get .NULL. in the view. However, when I tableupdate, it is being inserted into the table fields as 0 (zero) instead of .NULL. If, however, I actually replace the fields in the view with .NULL. (even though .null. is already there) - either programmatically or with Ctrl-0 - before I tableupdate, it works correctly. Can anyone confirm or comment on this?
>
>VFP5.0a / WIN98 / Set Null is offf / can reproduce in command window
>
>Thanks,
>Ken
Eric Shaneson
Cutting Edge Consulting
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform