Try OpenEdge Now
skip to main content
Data Access and Business Entity Objects : Data Access object : Elements of a Data Access object : Data-Source queries
Data-Source queries
The next thing to define in a Data Access object is any database queries the procedure uses to fill the ProDataSet tables. In the sample procedure OrderSource.p, there is one query for the top-level table, which is needed because it involves a join of multiple database tables. For example:
DEFINE QUERY qOrder FOR Order, Customer, SalesRep.
Because these queries define the nature of the Data-Source, and because they are used in the FILL process and the FILL events that the Data Access object defines, they belong here rather than in the Business Entity.
In cases where there is no standard database Data-Source, there may be no queries of this kind. In that case, whatever other definitions may be needed to allow the FILL event procedures to do their job belong here.