EntityDAC

TCustomContext.ExecuteQuery<T> Method

Execute a query directly in the database and returns the result collection.

Class

TCustomContext

Syntax

function ExecuteQuery<T: class>(const SQL: string; Params: TEDParams = nil): IObjectEnumerable<T>; overload;

Type parameters
T
Parameters
SQL
Specifies the query to be executed.
Params
Specifies the collection of the query parameters.

Remarks

Call the ExecuteQuery method to execute a auery directly in the database and obtain its result as a collection that implements the IEntityEnumerable interface. Supply the Params collection with the parameters accordingly to the ones in the query which itself is passed in the SQL string parameter. The Params array must contain all IN and OUT parameters defined in the query. For OUT parameters provide any values of valid types so that they are explicitly defined before call to the method.

See Also

© 1997-2017 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback