Executes an SQL update statement built using the supplied UpdateCommandConfig object

Namespace:  DbNetLink.Data
Assembly:  DbNetLink.DbNetData (in DbNetLink.DbNetData.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
public long ExecuteUpdate(
	UpdateCommandConfig CmdConfig
)
Visual Basic (Declaration)
Public Function ExecuteUpdate ( _
	CmdConfig As UpdateCommandConfig _
) As Long
Visual C++
public:
long long ExecuteUpdate(
	UpdateCommandConfig^ CmdConfig
)

Parameters

CmdConfig
Type: DbNetLink.Data..::.UpdateCommandConfig

The SQL statement, update and filter parameter collections

Return Value

Returns the number of rows affected

Examples

CopyC#
DbNetData Db = new DbNetData( ConfigurationManager.ConnectionStrings["nwind"] );
Db.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;
Db.ExecuteUpdate(CmdConfig);
Db.Close();

See Also