Hi there
im trying to find an resolution to a problem im having.
I have an object which has several integer/date properties
I use a datareader to load data from the database into these objects.
The issue is when i have null values for the integer/date fields.
i use the following function to loaddata into the properties:
so when my column has a null value in the table the function returns 0 whichs Code:
myobject.mynumber = getNullInt32(l_dr, 0) Private Function getNullInt32(ByVal p_reader As SqlDataReader, ByVal p_index As Integer) As Integer Dim l_retInteger As Integer = Nothing If Not p_reader.IsDBNull(p_index) Then l_retInteger = p_reader.GetInt32(p_index) End If Return l_retInteger End Function
sets the property myobject.mynumber to 0, when the value it not 0.
So i cannot distinguish the difference between a table field having 0 in it or nothing in it.
Is there any way to do the following from ASP 2.0 in ASP 1.1
s Code:
Public Property mynumber as Nullable(Of Integer)
this is very frustrating.![]()





Reply With Quote