Hello,
I have a table where a field can be null. At a certain point in code, I am pulling the value from that table and assigning it to a string. I get an error stating "Cast from type 'DBNull' to type 'String' is not valid", which is expected.
How should I handle this? I know in the SQL call I can use the ISNULL and substitute a space, which is how I handled this before. Should I test the value before I try to assign it everytime? Should I not be storing NULL values?
Thanks for the advice,
MAC