Aracılığıyla paylaş


ServerConnection.ExecuteScalar Method

Definition

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

Object[]

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

Returns

Applies to