If you ask me, all this null stuff is confusing as heck. I got along just
find with no null value types. First thing Jim Gray does on all his tables
is not allow nulls. Now we also have "IsNull" and "Is Null" to worry about
on CLR UDTs and nullable value types in c#, and Uggg. I would like the old
days (~last year) with value types and ref types and ref types can be null
and get rid of null value types on SQL all together (right, that will
happen).
--
William Stacey [MVP]
"Scottie_do" <Sc*******@discussions.microsoft.com> wrote in message
news:29**********************************@microsof t.com...
| Getting into the guts of it, is it true that nullable types is a struct of
an
| Int that lives on the stack and has an extra field that says "I'm NULL"?
| Anyone have anymore insight on the implementation?
|
| Not sure if this helps but I hear that matching DB types with intrinsic
| types is something the C# language team is working on (Whoohoo!) - See
below
|
|
http://msdn.microsoft.com/msdntv/epi...h/manifest.xml
|
| Sorry I can't offer the correct syntax for you to use in your program. I
| would want to do the same thing.
|
|
| "Randal" wrote:
|
| > >>Does anyone have some explanation as to why this is so tricky as to be
| > >>included?
| >
| > Will it ever be? In SQL Server NULL is a value type while null in C# is
| > an uninitialized object. So if I wanted to say this:
| >
| > xmlDataSet.Tables[0].Rows[0]["CurrentSalary"] = null
| >
| > Then I am setting that object to null, and not assigning the SQL server
| > column to the SQL value of NULL. The same goes with passing in a C#
| > null parameter to a stored proc. C# thinks I am passing in nothing (an
| > unintialized object) when what I really want to pass in is the SQL
| > value type of NULL.
| >
| > _Randal
| >
| >