View Single Post
 
Old November 20th, 2006, 10:23 AM
GailCG GailCG is offline
Authorized User
 
Join Date: Jan 2004
Location: , , .
Posts: 30
Thanks: 1
Thanked 0 Times in 0 Posts
Default Convert DBNull to String

In SQL is have a column with data and Null values. The Null values need to be converted to string. Thus far nothing I have tried works.
The results are sent to a datagrid.
My code snipet:
DataAccessLayer:
While reader.Read()
   colEmployees.Add((New Staff( _
   (reader("Cars"))
End While

BusinessLayer:
        Public Property Cars() As String
            Get
                Return m_Car
            End Get
            Set(ByVal value As String)
                value = System.Convert.ToString("m_Car")
            End Set
        End Property