Visual Basic (Declaration)
Public Function ExecuteNonQuery ( _
sqlCommand As String _
) As Integer
public int ExecuteNonQuery (
string sqlCommand
)
public:
int ExecuteNonQuery (
String^ sqlCommand
)
public int ExecuteNonQuery (
String sqlCommand
)
public function ExecuteNonQuery (
sqlCommand : String
) : int
Parameters
- sqlCommand
A String value that specifies the Transact-SQL command to be executed.
Return Value
An
Int32 value that specifies the total number of rows affected by the Transact-SQL command for UPDATE, INSERT, and DELETE statements. For all other types of statements, the return value is
-1.