ExecuteScalar Método (StringCollection)
Executes a batch of Transact-SQL statements and returns the first column of the first row as an object value.
Espacio de nombres: Microsoft.SqlServer.Management.Common
Ensamblado: Microsoft.SqlServer.ConnectionInfo (en Microsoft.SqlServer.ConnectionInfo.dll)
Sintaxis
'Declaración
Public Function ExecuteScalar ( _
sqlCommands As StringCollection _
) As Object()
'Uso
Dim instance As ServerConnection
Dim sqlCommands As StringCollection
Dim returnValue As Object()
returnValue = instance.ExecuteScalar(sqlCommands)
public Object[] ExecuteScalar(
StringCollection sqlCommands
)
public:
array<Object^>^ ExecuteScalar(
StringCollection^ sqlCommands
)
member ExecuteScalar :
sqlCommands:StringCollection -> Object[]
public function ExecuteScalar(
sqlCommands : StringCollection
) : Object[]
Parámetros
- sqlCommands
Tipo: System.Collections.Specialized. . :: . .StringCollection
A StringCollection system object value that specifies the batches of Transact-SQL statements to be executed.
Valor devuelto
Tipo: array<System. . :: . .Object> [] () [] []
An object array value that specifies the first column of the first row for each result set.
Vea también