S
Steve
From MSDN on DataRowVersion.Default:
"The row the default version for the current DataRowState. For a
DataRowState value of Added, Modified or Current, the default version is
Current. For a DataRowState of Deleted, the version is Original. For a
DataRowState value of Detached, the version is Proposed."
Reading the above, I would assume that this code:
/////
ReturnValue = MyDataRow[ "MyFieldName", DataRowVersion.Default ];
/////
Should be equivalent to this code:
/////
if ( MyDataRow.RowState == DataRowState.Deleted ) {
ReturnValue = MyDataRow[ "MyFieldName", DataRowVersion.Original ];
} else {
ReturnValue = MyDataRow[ "MyFieldName", DataRowVersion.Current ];
}
/////
However, the first block of code throws DeletedRowInaccessibleException
while the second one works just fine. Am I reading the documentation wrong?
What am I missing?
Thanks,
-Steve
"The row the default version for the current DataRowState. For a
DataRowState value of Added, Modified or Current, the default version is
Current. For a DataRowState of Deleted, the version is Original. For a
DataRowState value of Detached, the version is Proposed."
Reading the above, I would assume that this code:
/////
ReturnValue = MyDataRow[ "MyFieldName", DataRowVersion.Default ];
/////
Should be equivalent to this code:
/////
if ( MyDataRow.RowState == DataRowState.Deleted ) {
ReturnValue = MyDataRow[ "MyFieldName", DataRowVersion.Original ];
} else {
ReturnValue = MyDataRow[ "MyFieldName", DataRowVersion.Current ];
}
/////
However, the first block of code throws DeletedRowInaccessibleException
while the second one works just fine. Am I reading the documentation wrong?
What am I missing?
Thanks,
-Steve