Repository ExecuteQuery Method

Meta Data Services Programming

Meta Data Services Programming

Repository ExecuteQuery Method

This method executes the specified SQL query against the repository database, and returns a collection of repository object instances. The columns that are returned by the query must be either just the internal identifier (IntID) column, or the internal identifier and the type identifier (IntID and TypeID) columns of the RTblVersions table.

The ExecuteQuery method returns all objects based on the identifier. To create a query that applies selection criteria to an object collection, use the GetCollection method.

This property is not attached to the default interface for the repository Automation object; it is attached to the IRepositoryODBC interface. For more information about accessing a member of an interface that is not the default interface, see Accessing Automation Object Members.

Syntax

Set variable  = object.ExecuteQuery(queryString)

The ExecuteQuery method syntax has the following parts.

Part Description
variable Declared as an ObjectCol object. It receives the collection of objects that meet the selection criteria of the SQL query.
object The object that represents the open repository instance through which application code or a tool interacts with a repository.
queryString A string that contains the SQL Query or the name of a stored procedure to be executed.

See Also

Object Identifiers and Internal Identifiers

ObjectCol Object

Repository Object

RTblVersions SQL Table