J
John Dalberg
The code below (generated by the dataset designer) is receiving an
exception because the 'searchfor' column has nulls but this column in SQL
Server allows nulls. What am I missing? Shouldn't the generated code check
for DBNull first?
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public string SearchFor {
get {
try {
return
((string)(this[this.tableXML.SearchForColumn])); }
catch (System.InvalidCastException e) {
throw new System.Data.StrongTypingException("The
value for column \'SearchFor\' in table
\'XMLElement\' is DBNull.", e); }
}
set {
this[this.tableXML.SearchForColumn] = value;
}
}
John Dalberg
exception because the 'searchfor' column has nulls but this column in SQL
Server allows nulls. What am I missing? Shouldn't the generated code check
for DBNull first?
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public string SearchFor {
get {
try {
return
((string)(this[this.tableXML.SearchForColumn])); }
catch (System.InvalidCastException e) {
throw new System.Data.StrongTypingException("The
value for column \'SearchFor\' in table
\'XMLElement\' is DBNull.", e); }
}
set {
this[this.tableXML.SearchForColumn] = value;
}
}
John Dalberg