Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Any side effects in allowing NULL?
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01539772
Message ID:
01539798
Vues:
85
>Hi,
>
>Now that I have a couple of customers using my VFP application with SQL Server database I ran (once in a while) into a problem with NULLs. Here is what happens. In many places in the program the code creates an empty cursor. And then this cursor is populated from other cursors retrieved from SQL Server. And when adding a record to the initial empty cursor and a value happens to be NULL, the program bombs with an error (column COLNAME does not allow NULLS). In order to eliminate this issue I am thinking of always specifying/allowing NULL for every column of the empty cursor. Just in case. Will it slow down the processing of this cursor? The cursor usually is not very big, maybe up to 2000 records. What do you think? TIA.

Adding my voice to the chorus, be cautious with nulls. They have their place but it's very easy to run into unintended / unanticipated side effects. I worked for three years supporting a large VFP app which was originally written by a guy who was in love with nulls. Our main support person estimated that half our customer support issues were eventually traced back to problems with NULL.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform