المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : DBNull error



C# Programming
09-11-2009, 03:52 PM
Although I have all datatable columns set to accept DBNull, my application throws this exception:


[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public System.DateTime ArrangementDate {
get {
try {
return ((global::System.DateTime)(this[this.tablePaymentArrangements.ArrangementDateColumn]));
}
catch (global::System.InvalidCastException e) {
throw new global::System.Data.StrongTypingException("The value for column \'ArrangementDate\' in table \'PaymentArrangements\' is DBNull.", e);
}
}
set {
this[this.tablePaymentArrangements.ArrangementDateColumn] = value;
}
}


I'm stumped (right now). Any pointers would be much appreciated please.