Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
C# replacement for VFP code
Message
De
17/11/2006 10:49:50
 
 
À
17/11/2006 02:59:46
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01167122
Message ID:
01170709
Vues:
16
One question though. How do you assign a NULL value to a column in an update?

I'm not that fond of this approach as it could trigger all kinds of constraint and triggers on columns that essentially are not replaced. I'm not sure whether the transaction log is filled with the old and new values, but it would not surprise me.


On the second question, I don't know if the transaction log gets touched if an UPDATE statement replaces the column with the same value (i.e. Set MyCol = COALESCE(@MyCol,MyCol)). Good question, I'm going to check. If it does, you could avoid it by building the UPDATE statement dynamically in the proc and then executing it using T-SQL.

On the first question, if you explicitly wanted to assign a NULL, that's a good question, since the previous code is filtering out the NULLs. I'm not sure how to differentiate between an explicit NULL parameter, and a parameter that defaults to NULL because it wasn't passed. Let me check it out.

Kevin
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform