You can use the database-centric types in System.Data.SqlTypes. They not only 
implement INullable (and IComparable if applicable) but are isomorphic with the 
database types. INullable/IComparable are used with Oracle-specific types in 
System.Data.OracleCient, and the interfaces can be used by any data provider. You can 
assign or check for NULL. Currently using them in the DataSet is not an elegant as it 
could be.

Cheers,
Bob Beauchemin
http://staff.develop.com/bobb



-----Original Message-----
From: Bill Bassler [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 09, 2003 10:59 AM
To: [EMAIL PROTECTED]
Subject: [ADVANCED-DOTNET] Elegant way of handling "nulls" when
assigning to the DateTime structure


When for example retrieving a null value from a database ... because the
DateTime structure cannot have null reference assigned to it ...
you end up having to check every time you want to attempt to assign it.

It appears that you can use implicit operator to create wrapper around
DateTime to get around these issues.  Is there a more elegant way or there
something that I'm completely missing?

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
NEW! ASP.NET courses you may be interested in:

2 Days of ASP.NET, 29 Sept 2003, in Redmond
http://www.develop.com/courses/2daspdotnet

Guerrilla ASP.NET, 13 Oct 2003, in Boston
http://www.develop.com/courses/gaspdotnet

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
NEW! ASP.NET courses you may be interested in:

2 Days of ASP.NET, 29 Sept 2003, in Redmond
http://www.develop.com/courses/2daspdotnet

Guerrilla ASP.NET, 13 Oct 2003, in Boston
http://www.develop.com/courses/gaspdotnet

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to