Kevin,
Like I said before, regarding setting the current row in RowUpdating():
// this does NOT set the row: this.oSurveyDue.Entity.SetDataRow(CurrentRow);
// The below does:
this.oSurveyDue.DataRow = CurrentRow;
Regarding storing null date my code below works, what you provided does not compile & provides this error:
Error 1 Type of conditional expression cannot be determined because there is no implicit conversion between 'System.DBNull' and 'System.DateTime?' C:\MM.NET\MMS\MMS Business Objects CSharp\SurveyDueEntity.cs 112 62 MMS Business Objects CSharp
Where might we be out of sync?
Thanks, Ted
>>
>>// Use the below to set the entity data row
>>this.oSurveyDue.Entity.SetDataRow(CurrentRow);
>
>
>The RowUpdating event does pass the current row in the e.RowIndex property, so your code is correct for getting a reference to the DataRow being updated.
>
>
>>I changed the entity set/get:
>>
>>public DateTime? Svd_PostDT
>>{
>>get { return (DateTime?)mmType.GetNullableDbValue(this.Row["Svd_PostDT"]); }
>>set { this.Row["Svd_PostDT"] = (value == null) ? mmType.GetEmptyDataValue("System.DateTime") : value; }
>> // 11/16/2006 TAG added GetEmptyDataValue() above
>>}
>
>That will work if you want to store an empty date value rather than null...if you want to save a null instead, you should do this:
>
>
set { this.Row["svd_PostDT"] = (value == null) ? DBNull.Value : value; }
>
>Best Regards,