ExecuteScalar Método (String)
Executes a Transact-SQL statement 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 ( _
sqlCommand As String _
) As Object
'Uso
Dim instance As ServerConnection
Dim sqlCommand As String
Dim returnValue As Object
returnValue = instance.ExecuteScalar(sqlCommand)
public Object ExecuteScalar(
string sqlCommand
)
public:
Object^ ExecuteScalar(
String^ sqlCommand
)
member ExecuteScalar :
sqlCommand:string -> Object
public function ExecuteScalar(
sqlCommand : String
) : Object
Parámetros
- sqlCommand
Tipo: System. . :: . .String
A String value that specifies the Transact-SQL command to be executed.
Valor devuelto
Tipo: System. . :: . .Object
An Object system object value that specifies the first column of the first row of the result set.