G
George G.
Hi there,
I hope I am posting to the correct news group. What would be a good way to
deal with null database values using ADO.NET. My SQL queries sometimes
return null values when I have left outer joints for example and when I use
GetString() or GetInt32() from DBReader I get an error -
System.InvalidCastException: Specified cast is not valid. I know that one
way to correct this is to make sure the SQL queries never return null
values, but there must be more elegant way of fixing it.
TIA, regards,
George
I hope I am posting to the correct news group. What would be a good way to
deal with null database values using ADO.NET. My SQL queries sometimes
return null values when I have left outer joints for example and when I use
GetString() or GetInt32() from DBReader I get an error -
System.InvalidCastException: Specified cast is not valid. I know that one
way to correct this is to make sure the SQL queries never return null
values, but there must be more elegant way of fixing it.
TIA, regards,
George