Condividi tramite


ServerConnection.ExecuteScalar Method (StringCollection)

Executes a batch of Transact-SQL statements and returns the first column of the first row as an object value.

Spazio dei nomi: Microsoft.SqlServer.Management.Common
Assembly : Microsoft.SqlServer.ConnectionInfo (in microsoft.sqlserver.connectioninfo.dll)

Sintassi

'Dichiarazione
Public Function ExecuteScalar ( _
    sqlCommands As StringCollection _
) As Object()
public Object[] ExecuteScalar (
    StringCollection sqlCommands
)
public:
array<Object^>^ ExecuteScalar (
    StringCollection^ sqlCommands
)
public Object[] ExecuteScalar (
    StringCollection sqlCommands
)
public function ExecuteScalar (
    sqlCommands : StringCollection
) : Object[]

Parametri

  • sqlCommands
    A StringCollection system object value that specifies the batches of Transact-SQL statements to be executed.

Valore restituito

An object array value that specifies the first column of the first row for each result set.

Osservazioni

Questo spazio dei nomi, classe o membro è supportato solo nella versione 2.0 di Microsoft .NET Framework.

Thread Safety

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Piattaforme

Piattaforme di sviluppo

Per un elenco delle piattaforme supportate, vedere Requisiti hardware e software per l'Installazione di SQL Server 2005.

Piattaforme di destinazione

Per un elenco delle piattaforme supportate, vedere Requisiti hardware e software per l'Installazione di SQL Server 2005.

Vedere anche

Riferimento

ServerConnection Class
ServerConnection Members
Microsoft.SqlServer.Management.Common Namespace

Altre risorse

Calling Methods