|
DataExtensionsExecuteNonQueryTConnection(TConnection, String, Int32, Object) Method
|
Executes the SQL statement using IDbConnection, and returns the number of rows affected.
Namespace: GSF.DataAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.248-beta+a497a19de709fd99e2448886199a2c8824265ddf
Syntaxpublic static int ExecuteNonQuery<TConnection>(
this TConnection connection,
string sql,
int timeout,
params Object[] parameters
)
where TConnection : IDbConnection
<ExtensionAttribute>
Public Shared Function ExecuteNonQuery(Of TConnection As IDbConnection) (
connection As TConnection,
sql As String,
timeout As Integer,
ParamArray parameters As Object()
) As Integer
public:
[ExtensionAttribute]
generic<typename TConnection>
where TConnection : IDbConnection
static int ExecuteNonQuery(
TConnection connection,
String^ sql,
int timeout,
... array<Object^>^ parameters
)
[<ExtensionAttribute>]
static member ExecuteNonQuery :
connection : 'TConnection *
sql : string *
timeout : int *
parameters : Object[] -> int when 'TConnection : IDbConnection
JavaScript does not support generic types or methods.
View SourceParameters
- connection TConnection
- The IDbConnection to use for executing the SQL statement.
- sql String
- The SQL statement to be executed.
- timeout Int32
- The time in seconds to wait for the SQL statement to execute.
- parameters Object
- The parameter values to be used to fill in IDbDataParameter parameters identified by '@' prefix in sql expression.
Type Parameters
- TConnection
- Type of IDbConnection to use.
Return Value
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
TConnection. 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