ServerConnection.ExecuteScalar Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ExecuteScalar(StringCollection) |
Executes the T-SQL statements in the StringCollection. An array of objects are returned that each contain the first column of the first row of the result set of each executed statement. The Connect() method will be called if the connection with the server is not open. Exceptions: ConnectionFailureException ExecutionFailureExeception |
ExecuteScalar(String) |
Executes a T-SQL statement. An objects is returned that contains the first column of the first row of the result set. The Connect() method will be called if the connection with the server is not open. Exceptions: ConnectionFailureException ExecutionFailureExeception |
ExecuteScalar(StringCollection)
Executes the T-SQL statements in the StringCollection. An array of objects are returned that each contain the first column of the first row of the result set of each executed statement. The Connect() method will be called if the connection with the server is not open. Exceptions: ConnectionFailureException ExecutionFailureExeception
public object[] ExecuteScalar (System.Collections.Specialized.StringCollection sqlCommands);
member this.ExecuteScalar : System.Collections.Specialized.StringCollection -> obj[]
Public Function ExecuteScalar (sqlCommands As StringCollection) As Object()
Parameters
- sqlCommands
- StringCollection
Returns
Applies to
ExecuteScalar(String)
Executes a T-SQL statement. An objects is returned that contains the first column of the first row of the result set. The Connect() method will be called if the connection with the server is not open. Exceptions: ConnectionFailureException ExecutionFailureExeception
public object ExecuteScalar (string sqlCommand);
member this.ExecuteScalar : string -> obj
Public Function ExecuteScalar (sqlCommand As String) As Object
Parameters
- sqlCommand
- String