Gets or sets the DataRowVersion to use when loading a DataTable column into the TdParameter object.
Property Value
One of the
System.Data.DataRowVersion
enumeration values. The default is
Current
.
The following example creates a
TdCommand which is used as a
TdDataAdapter.UpdateCommand
property. The first parameter is set to Current while the second parameter is set to Original. In this case, CustomerID uniquely identifies the row.
public TdCommand GetUpdateCommand()
{
TdCommand cmd = new TdCommand();
cmd.CommandText = "UPDATE Customer SET Status = ? WHERE CustomerID = ?";
TdParameter status = new TdParameter("STATUS", TdType.Char, 1);
status.SourceColumn = "STATUS";
status.SourceVersion = SourceVersion.Current;
cmd.Add(status);
TdParameter customerId = new TdParameter("CUSTOMERID", TdType.Char, 10);
customerId.SourceColumn = "CUSTOMERID";
customerId.SourceVersion = SourceVersion.Original;
cmd.Add(customerId);
return cmd;
}
Target Platforms: Windows 7, Windows 8, Windows 8.1, Windows 10, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2