Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
C# replacement for VFP code
Message
From
17/11/2006 10:49:50
 
 
To
17/11/2006 02:59:46
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01167122
Message ID:
01170709
Views:
15
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform