Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Any side effects in allowing NULL?
Message
 
 
À
30/03/2012 10:46:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01539772
Message ID:
01539820
Vues:
51
>>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.
>
>We had one last that in the last week. I estimate that 6 to 8% of the known issues were related to NULLs in the database. Once we fully implemented the framework and normalized the data, we almost brought it down to 0%. The one of last week was caused by a robot which will go off production in a few days. So, it wasn't updated (old code out of the framework) to avoid NULLs.
>
>I also avoid NULLs in the SQL command when using LEFT JOINs. When I build the SQL command, I call a method loData.IsNull(), which will make sure to avoid receiving NULL values in the result and put empty values instead.

Bases on your and Sergey's input I will have to go through all my SQL server tables and make sure I have an empty string as default on those columns that may affect my program. Not a trivial task since the app has about 90+ tables.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform