System.Data.Generic
DataSourceExecuteScalar Method (String) |
Executes the query, and returns the first column of the first row in the result set returned by the query.
Namespace: System.Data.Generic
Assembly: System.Data.Generic (in System.Data.Generic.dll) Version: 1.9.5473.30542 (1.9.5473.2392)

public Object ExecuteScalar( string SQL )
Public Function ExecuteScalar ( SQL As String ) As Object
public: Object^ ExecuteScalar( String^ SQL )
member ExecuteScalar : SQL : string -> Object
Parameters
- SQL
- Type: SystemString
Transact-SQL statement to execute against the connection.
Return Value
Type: ObjectThe first column of the first row in the result set, or a null reference (Nothing in Visual Basic) if the result set is empty. Returns a maximum of 2033 characters.

