Release 10.1A: OpenEdge Development:
Progress 4GL Handbook

> ## PREPARE-STRING attribute

> Once you have prepared a query, you can verify what its current `FOR EACH` statement is using the `PREPARE-STRING` attribute, which returns the effect of the most recent `QUERY-PREPARE` method, as in this example:

>     MESSAGE hQuery:PREPARE-STRING VIEW-AS ALERT-BOX.

> Figure 19–4 shows the result.

> Figure 19–4: PREPARE-STRING message

> The `PREPARE-STRING` attribute applies only to dynamic queries. It does not return the `FOR EACH` statement used in an `OPEN QUERY` statement for a static query. The example in the "Using the SELF handle to identify an object in a trigger" section uses this attribute to save off the current `FOR EACH` statement for a query to restore it if the user’s attempt to replace it with a different one fails.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095