As an alternative, you could create a function that always returns a valid string.
I have a function called GetDBString():
public static string GetDBString(object obj) {
if(!(obj is DBNull)) {
return (string)obj;
}
else {
return string.Empty;
}
}
-
Peter