The QueryCommandConfig class is used to combine an SQL statment, associated parameters
and CommandBehavior 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 QueryCommandConfig : CommandConfig |
| Visual Basic (Declaration) |
|---|
Public Class QueryCommandConfig _ Inherits CommandConfig |
| Visual C++ |
|---|
public ref class QueryCommandConfig : public CommandConfig |
Remarks
The QueryCommandConfig object can be used with the following methods
Examples
DbNetData Db = 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; Db.ExecuteQuery(CmdConfig);