DataSource.ExecuteObject(T) Method

System.Data.Generic

DataSourceExecuteObjectT Method
Executes the query, and returns a object by the type T.

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

Parameters

SQL
Type: SystemString
SQL statement to execute.

Type Parameters

T
Type of object to return.

Return Value

Type: T
Object of type T.
Exceptions
ExceptionCondition
ArgumentNullExceptionIn case the SQL is null.
SqlExceptionIn case the underlying connection cause an exception.
Remarks