I've read the book pretty thoroughly and am still a little fuzzy as to the functionality and benefits of these two things. Can anyone expand on what the benefits are for both? I apologize for my lack of understanding........... Thank you in advance!
-Greg
SmartDate is a date type that has two primary purposes:
SafeDataReader is a wrapper for any data reader object, and it exists to remove null values. If your database allows nulls in some columns where you really don't need them, then SafeDataReader is an easy way to read from those tables without having to manually de-null all the values.
Rocky, thank you - that helps a lot.
I look forward to meeting you in Denver this coming Monday! I'll be at the meeting you'll be speaking at.
Thanks again!
-Greg
I use SafeDataReader very often in my Business Object Layer.
It is convinient for me to log Column Name and Position when InvalidCastException occures in any of its Getxxx(int) methods. So I created derived class SafeDataReader2 and overrided methods that incapsulate additional info into my custom exception:
Public Overrides Function GetInt32(ByVal i As Integer) As Integer Try Return MyBase.GetInt32(i) Catch invCastException As InvalidCastException Throw New DataReaderInvalidCastException("InvalidCastException", invCastException, i,GetName(i)) End TryI found that Getxxx(string) methods of SafeDataReader are not overridable. Is there some particular reason that prevents these methods from being overridable?
Thanks a lot in advance,
Michael
If you like using SmartDate after you use it a bit, check out the CSLA Contrib project, there are other Smart... classes to use also.
Copyright (c) Marimer LLC