P psycho Oct 17, 2006 #1 how should i hanle null values returned by the datareader i am using OleDbDataReader for accessing access database.
how should i hanle null values returned by the datareader i am using OleDbDataReader for accessing access database.
E Eliyahu Goldin Oct 17, 2006 #2 Typically you would first check if the value is null with IsDbNull method. If it is not, you can get the value with one of the GetXxx methods
Typically you would first check if the value is null with IsDbNull method. If it is not, you can get the value with one of the GetXxx methods
K Karl Seguin [MVP] Oct 17, 2006 #4 There's a SafeDataReader in the CSLA.NET which takes care of this for you. Here's the VB.NET version: http://www.lhotka.net/Article.aspx?id=9280bc86-c706-4d2d-8993-8b5bda6bad22 there's a C# one somewhere on the site... Karl
There's a SafeDataReader in the CSLA.NET which takes care of this for you. Here's the VB.NET version: http://www.lhotka.net/Article.aspx?id=9280bc86-c706-4d2d-8993-8b5bda6bad22 there's a C# one somewhere on the site... Karl