Conversion from type 'DBNull' to type 'String' is not valid

  • Thread starter Thread starter tropicwhisper
  • Start date Start date
T

tropicwhisper

Guest
I have tried everything I could to avoid this error to no avail.

If Not DBNull.Value.Equals(rdr_Import("Color_Style")) Then

m_Columns_Building_Import = "Something"
Else
m_Columns_Building_Import = "Nothing"
End If

If Not IsDBNull(rdr_Import("Color_Style")) Then
m_Columns_Building_Import = "Something"
Else
m_Columns_Building_Import = "Nothing"
End If

If IsDBNull(rdr_Import("Color_Style")) Then
m_Columns_Building_Import = "Nothing"
Else
m_Columns_Building_Import = "Something"
End If

Any ideas?

ADawn


ADawn

Continue reading...
 
Back
Top