private static DataRowVersion GetParameterSourceVersion(StatementType statementType, IDataParameter parameter)
{
switch (statementType)
{
case StatementType.Insert: return DataRowVersion.Current; // ignores parameter.SourceVersion
case StatementType.Update: return parameter.SourceVersion;
case StatementType.Delete: return DataRowVersion.Original; // ignores parameter.SourceVersion
case StatementType.Select:
case StatementType.Batch:
throw ADP.UnwantedStatementType(statementType);
default:
throw ADP.InvalidStatementType(statementType);
}
}