The UpdateCommandConfig class is used to combine an SQL statment, associated update parameters
and filter parameters into a single object
Namespace:
DbNetLink.DataAssembly: DbNetLink.DbNetData (in DbNetLink.DbNetData.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
| C# |
|---|
public class UpdateCommandConfig : CommandConfig |
| Visual Basic (Declaration) |
|---|
Public Class UpdateCommandConfig _ Inherits CommandConfig |
| Visual C++ |
|---|
public ref class UpdateCommandConfig : public CommandConfig |
Remarks
The UpdateCommandConfig object can be used with the following methods
Examples
DbNetData Db = new DbNetData("Server=dbserver;Database=Northwind;Trusted_Connection=true;"); UpdateCommandConfig CmdConfig = new UpdateCommandConfig("update products set discontinued = @discontinued where categoryid = @categoryid"); CmdConfig.Params["discontinued"] = 1; CmdConfig.FilterParams["categoryid"] = 9; // Discontinue all products that have a Category Id of 9 Db.ExecuteUpdate(CmdConfig);