Executes an SQL update statement built using the supplied UpdateCommandConfig object
| C# | Visual Basic |
public long ExecuteUpdate( UpdateCommandConfig CmdConfig )
Public Function ExecuteUpdate ( _ CmdConfig As UpdateCommandConfig _ ) As Long
- CmdConfig (UpdateCommandConfig)
-
The SQL statement, update and filter parameter collections
Returns the number of rows affected
DbNetData Data = new DbNetData( ConfigurationSettings.AppSettings[ "nwind" ] ); Data.Open(); UpdateCommandConfig CmdConfig = new UpdateCommandConfig("products"); // It is only necessary to supply the table name as the full update statement is built automatically CmdConfig.Params["productname"] = ProductName.Value; CmdConfig.FilterParams["productid"] = ProductID.Value; Data.ExecuteUpdate(CmdConfig); Data.Close();