The UpdateCommandConfig class is used to combine an SQL statment, associated update parameters
and filter parameters into a single object
| C# | Visual Basic |
public class UpdateCommandConfig : CommandConfig
Public Class UpdateCommandConfig _ Inherits CommandConfig
| All Members | Constructors | Fields | |||
| Icon | Member | Description |
|---|---|---|
| UpdateCommandConfig()()() | Initializes a new instance of the UpdateCommandConfig class | |
| UpdateCommandConfig(String) | Initializes a new instance of the UpdateCommandConfig class | |
| FilterParams |
Parameters used to create the "where" filter on the update statement
| |
| Params |
Parameter values collection
(Inherited from CommandConfig.) | |
| Sql |
Sql command text including any paramater placeholders
(Inherited from CommandConfig.) |
The UpdateCommandConfig object can be used with the following methods
- [!:DbNetLink.DbNetData.ExecuteUpdate(UpdateCommandConfig)]
DbNetData Data = 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 Data.ExecuteUpdate(CmdConfig);
| Object | ||
| CommandConfig | ||
| UpdateCommandConfig | ||