Creates an appropriate
IDbCommand and executes a statement against the connection.
Namespace: System.Extensions.DataAssembly: System.Extensions (in System.Extensions.dll) Version: 0.0.0.5 (0.0.0.5)
Syntax
C# |
---|
public static int ExecuteCommandNonQuery(
this IDbConnection connection,
string commandText,
CommandType commandType
) |
Visual Basic |
---|
<ExtensionAttribute>
Public Shared Function ExecuteCommandNonQuery (
connection As IDbConnection,
commandText As String,
commandType As CommandType
) As Integer |
Visual C++ |
---|
public:
[ExtensionAttribute]
static int ExecuteCommandNonQuery(
IDbConnection^ connection,
String^ commandText,
CommandType commandType
) |
F# |
---|
static member ExecuteCommandNonQuery :
connection : IDbConnection *
commandText : string *
commandType : CommandType -> int
|
Return Value
Type:
Int32The number of rows affected.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IDbConnection. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also