Executes update statement built using the supplied SQL statement and seperate update value and filter parameters
Namespace:
DbNetLink.DataAssembly: DbNetLink.DbNetData (in DbNetLink.DbNetData.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
| C# |
|---|
public long ExecuteUpdate( string Sql, IDictionary Params, IDictionary FilterParams ) |
| Visual Basic (Declaration) |
|---|
Public Function ExecuteUpdate ( _ Sql As String, _ Params As IDictionary, _ FilterParams As IDictionary _ ) As Long |
| Visual C++ |
|---|
public: long long ExecuteUpdate( String^ Sql, IDictionary^ Params, IDictionary^ FilterParams ) |
Parameters
- Sql
- Type: System..::.String
The SQL statement, update and filter parameter collections
- Params
- Type: System.Collections..::.IDictionary
Column value parameters collection
- FilterParams
- Type: System.Collections..::.IDictionary
Filter value parameters collection
Return Value
Returns the number of rows affected
Examples
DbNetData Db = new DbNetData( ConfigurationManager.ConnectionStrings["nwind"] ); Db.Open(); ListDictionary Params = new ListDictionary(); ListDictionary FilterParams = new ListDictionary(); Params["productname"] = ProductName.Value; FilterParams["productid"] = ProductID.Value; Db.ExecuteUpdate("product", Params, FilterParams); // When using separate column value and filter parameters it is only // necessary to specify the table name in statement text Db.Close();