DataSource.ExecuteList(T) Method

System.Data.Generic

DataSourceExecuteListT Method
Executes the query, and returns a collection of the first column.

Namespace: System.Data.Generic
Assembly: System.Data.Generic (in System.Data.Generic.dll) Version: 1.9.5473.30542 (1.9.5473.2392)
Syntax
public List<T> ExecuteList<T>(
	string SQL
)
where T : class
Public Function ExecuteList(Of T As Class) ( 
	SQL As String
) As List(Of T)
public:
generic<typename T>
where T : ref class
List<T>^ ExecuteList(
	String^ SQL
)
member ExecuteList : 
        SQL : string -> List<'T>  when 'T : not struct

Parameters

SQL
Type: SystemString
SQL statement to execute.

Type Parameters

T
Type of the first column.

Return Value

Type: ListT
List of first column
Exceptions
ExceptionCondition
ArgumentNullExceptionIn case the SQL is null.
SqlExceptionIn case the underlying connection cause an exception.
Remarks
Specifying a SQL statement with multiple columns will not change the output. Only the first column will be returned.
See Also