J
Jason
The following code snippet fails if the column contains a DBNull value.
private SqlParameter[] BuildSecurityParamaterArray(
SecurityDS.lac_SecurityRow sec )
{
SqlParameter[] sp = { new SqlParameter("@USER_ID", sec.USER_ID),
new SqlParameter("@USER_TYPE", sec.USER_TYPE) };
}
For example, if sec.USER_TYPE contains a null value, this method throws an
error stating it cannot get the value because it is DBNull, even though null
values are allowed for this column.
Is there some way to make this work?
private SqlParameter[] BuildSecurityParamaterArray(
SecurityDS.lac_SecurityRow sec )
{
SqlParameter[] sp = { new SqlParameter("@USER_ID", sec.USER_ID),
new SqlParameter("@USER_TYPE", sec.USER_TYPE) };
}
For example, if sec.USER_TYPE contains a null value, this method throws an
error stating it cannot get the value because it is DBNull, even though null
values are allowed for this column.
Is there some way to make this work?