I would suggest to use specific .NET Data Provider types (as System.Data.SqlTypes, System.Data.OracleCient, etc) in the Data Layer, I mean where you are moving data from the Db (with a DataAdapter or with a DataCommand) to the memory (DataSet, variables, Array, etc.) and vice versa. That's because .NET Data Provider types better represent the native Db types (i.e. SqlDateTime have MinValue and MaxValue different from System.DateTime; SqlDecimal can set Scale and Precision while System.Decimal cannot, etc).
I would suggest to use NullableTypes in the Business Layer and in the User Interface Layer because - they are identical to the native .NET types (NullableDateTime have MinValue and MaxValue equals to System.DateTime MinValue and MaxValue, etc.) - they work with .NET Remoting - they work with .NET Web Services - they are data base agnostic - they have the NullConvertClass that can be used to seamlessly integrate NullableTypes with Web server controls and WinForms controls - they have the DbNullCOnvert class that converts NullableTypes values to in-memory Db values (Command Parameters, DataReader values, DataSet column values) and vice versa ciao, (luKa) On Thu, 9 Oct 2003 20:36:09 -0700, Beauchemin, Bob <[EMAIL PROTECTED]> wrote: >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 > > =================================== 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
