In the code below, cusfile is a sql table and I am using linq to SQL
the line of code for .addr_2 compiles (I haven't tested yet to see if it works)
the line of code for .contact does not compile saying "value of type DBNull cannot be converted to string.
contact at the database level is allowed to be null
What am I doing wrong?
Dim cusN As cusfil_SQL
.addr_2 = CStr(IIf(String.IsNullOrEmpty(cusRec.add2), DBNull.Value, cusRec.add2))
.contact = DBNull.Value