The QueryCommandConfig class is used to combine an SQL statment, associated parameters
and CommandBehavior into a single object
| C# | Visual Basic |
public class QueryCommandConfig : CommandConfig
Public Class QueryCommandConfig _ Inherits CommandConfig
| All Members | Constructors | Fields | |||
| Icon | Member | Description |
|---|---|---|
| QueryCommandConfig()()() | Initializes a new instance of the QueryCommandConfig class | |
| QueryCommandConfig(String) | Initializes a new instance of the QueryCommandConfig class | |
| Behavior |
The QueryCommandConfig class is used to combine an SQL statment, associated parameters
and CommandBehavior into a single object
| |
| Params |
Parameter values collection
(Inherited from CommandConfig.) | |
| Sql |
Sql command text including any paramater placeholders
(Inherited from CommandConfig.) |
The QueryCommandConfig object can be used with the following methods
- [!:DbNetLink.DbNetData.ExecuteQuery(QueryCommandConfig)]
- [!:DbNetLink.DbNetData.GetDataSet(QueryCommandConfig)]
- [!:DbNetLink.DbNetData.GetDataTable(QueryCommandConfig)]
DbNetData Data = new DbNetData("Server=dbserver;Database=Northwind;Trusted_Connection=true;"); QueryCommandConfig CmdConfig = new QueryCommandConfig("select * from customers where city = @city and country = @country"); CmdConfig.Params["city"] = "London"; CmdConfig.Params["country"] = "UK"; CmdConfig.Behavior = CommandBehavior.SequentialAccess; Data.ExecuteQuery(CmdConfig);
| Object | ||
| CommandConfig | ||
| QueryCommandConfig | ||