Metodo SfcTSqlExecutor.ExecuteScalar
Executes the query, and returns the first column of the first row in the result set returned by the query. Additional columns or rows are ignored. Non fare riferimento direttamente a questo membro nel codice. Supporta l'infrastruttura di SQL Server.
Spazio dei nomi Microsoft.SqlServer.Management.Sdk.Sfc
Assembly: Microsoft.SqlServer.Management.Sdk.Sfc (in Microsoft.SqlServer.Management.Sdk.Sfc.dll)
Sintassi
'Dichiarazione
Public Shared Function ExecuteScalar ( _
connection As ServerConnection, _
script As String _
) As Object
'Utilizzo
Dim connection As ServerConnection
Dim script As String
Dim returnValue As Object
returnValue = SfcTSqlExecutor.ExecuteScalar(connection, _
script)
public static Object ExecuteScalar(
ServerConnection connection,
string script
)
public:
static Object^ ExecuteScalar(
ServerConnection^ connection,
String^ script
)
static member ExecuteScalar :
connection:ServerConnection *
script:string -> Object
public static function ExecuteScalar(
connection : ServerConnection,
script : String
) : Object
Parametri
- connection
Tipo: Microsoft.SqlServer.Management.Common.ServerConnection
The server connection.
- script
Tipo: System.String
A string value of the script.
Valore restituito
Tipo: System.Object
The first column of the first row in the result set, or a null reference if the result set is empty. Returns a maximum of 2033 characters.