Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What should I do for NULLs?
Message
 
 
À
15/07/2008 22:38:15
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01331280
Message ID:
01331594
Vues:
6
>>I've decided to just convert in the SP. I was worried about Update/Insert, but I spoke with my colleague and we decided to use IsMember field as a condition to add/update data.
>
>I don't agree with that option ... if it's NULL in the database and no one changes it, is should remain NULL. By converting it to something other than NULL in the SP, you've lost that capability.
>
>However, I have no idea what this "IsMember field" is that you refer to, so perhaps you've found another acceptable way of handling this that I haven't heard about. Is this something new to .NET 2.0 or is this some kind of ASP.NET thing?
>
>~~Bonnie

No, here is what I mean. I added a new table with just few fields: PersonID, IsMember, PaymentMethod, StartDate, BillQuaterly. Currently this information is only requested by one particular site. I found that I can not just use nulls as is, I got errors coming from my FormView (probably the datetime and bit fields were the culprit). So, I'm now getting them as values and the condition determening if I do want to insert a new record in this table is IsMember field eaquals to 1. If the person is a member, it means that other fields have information. Otherwise I don't insert a new record. However, there may be a case when person was a member, but now not a member. I haven't decided how to handle this situation yet.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform