ISqlSession.ExecuteNonQuery Method
Executes a Transact-SQL query that does not return any rows.
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Function ExecuteNonQuery ( _
command As SqlCommand _
) As Integer
'Usage
Dim instance As ISqlSession
Dim command As SqlCommand
Dim returnValue As Integer
returnValue = instance.ExecuteNonQuery(command)
int ExecuteNonQuery(
SqlCommand command
)
Parameters
command
Type: System.Data.SqlClient.SqlCommandA SqlCommand object that represents the Transact-SQL query to execute.
Return Value
Type: System.Int32
A 32-bit integer that indicates the number of rows affected by the command.
Remarks
The ExecuteNonQuery method throws an Exception exception if the command fails to execute.