DB2ParameterCollection Class
Collects all parameters relevant to a
DB2Command as well as their respective mappings to
System.Data.DataSet columns.
The following example adds instance of
DB2Parameter to collection.
|
|---|
public void AddDB2Parameters()
{
// Create dB2Connection and dB2Command.
dB2Command.CommandText = "DELETE Dept WHERE DeptNo = :DeptNo";
dB2Command.Parameters.Add("DeptNo", DB2Type.Int).Value = 50;
dB2Command.ExecuteNonQuery();
} |
|
|---|
Public Sub AddDB2Parameters()
// Create dB2Connection and dB2Command.
dB2Command.CommandText = "DELETE Dept WHERE DeptNo = :DeptNo"
dB2Command.Parameters.Add("DeptNo", DB2Type.Int).Value = 50
dB2Command.ExecuteNonQuery()
End Sub 'AddDB2Parameters |