WHERE-STRING attribute
Returns and allows you to modify the current WHERE expression from the query generated for a specified data-relation that links the child table to its parent.
Data type: CHARACTER
Access: Readable/Writeable
Applies to: Data-relation object handle
This attribute evaluates to the WHERE expression from the query that the AVM generates for you based on the data-relation between parent and child buffers. You can also use this attribute to build an extended query of your own based on this default relationship.
Note: You can provide the initial WHERE expression for a query using the FILL-WHERE-STRING attribute.If you assign a new value to the attribute, the AVM uses the new WHERE expression when it re-opens the query during navigation to filter the child table of the data-relation. When you set this attribute, if the AVM finds an error in the new WHERE expression, it raises a run-time error on the assignment.
The NAME attribute of the Temp-table object handle is writeable for dynamic and AVM-generated temp-tables. You might need to update a WHERE-STRING that references a renamed temp-table with new strings using the new table name.
Typically, you modify an existing WHERE expression by appending additional conditions to it, as shown in the
r-wherestr.p
example procedure. This example provides the initial WHERE expression using the FILL-WHERE-STRING attribute. It then generates the complete initial query for the data-relation with the call to the ProDataSet FILL( ) method, and uses the WHERE-STRING attribute to modify the existing WHERE expression to further filter the query buffers.
See also: FILL-WHERE-STRING attribute, QUERY attribute
OpenEdge Release 10.2B
|