G
Guest
I'm getting the following Errors during run time and I tried capturing it
using the code below but I'm not able to. I'm also showing in Debug the
value is {}. How can I catch this so it won't create Exception error?
Thanks.
Unable to cast object of type 'System.DBNull' to type 'System.String'.
if ((dr["Primary Group"] != null) && (dr["Primary Group"] != ""))
groupName = (string)dr["Primary Group"];
p- dr["Primary Group"] {} object {System.DBNull}
- Static members
Value {} System.DBNull
using the code below but I'm not able to. I'm also showing in Debug the
value is {}. How can I catch this so it won't create Exception error?
Thanks.
Unable to cast object of type 'System.DBNull' to type 'System.String'.
if ((dr["Primary Group"] != null) && (dr["Primary Group"] != ""))
groupName = (string)dr["Primary Group"];
p- dr["Primary Group"] {} object {System.DBNull}
- Static members
Value {} System.DBNull