Creating Queries

You begin the creation of a query just like you begin the creation of any other Application Object in VPM Enterprise. 

Need Help Starting: See How to Begin Creating a New Application Object of the Creating Application Objects chapter.

You can create a query as a Menu Object or a Called Object. In either case, you select Query as the new object type on the New Object dialog and enter a file name for the query. After you enter the query’s name, VPM Enterprise displays the query Object Editor.

The Query Editor gives you access to the Visual FoxPro Query Designer.

Ø To create a query

1.   Click the Edit button on the Query Editor. VPM Enterprise displays the New Query dialog.

·       Blank: Click the Blank option button on the New Query dialog to create the query from scratch.

·       Copy: Click the Copy option button to create the query by copying an existing query.

2.   Click OK on the New Query dialog after you’ve made your choice. If you selected Blank, VPM Enterprise displays the Query Designer.

3.   Use the Visual FoxPro Query Designer to create your query. If you need help with the Visual FoxPro Query Designer, see your Visual FoxPro  Online Help.

4.   To test your query, select Run Query from the Query menu.

Calling Queries from .App’s and .EXE’s

The menu command shown in the Query Editor illustration on the previous page is the command you would use to call a query if you’re distributing your application as an .APP file. This command, “MODIFY QUERY queryname” runs the Visual FoxPro Query Designer and lets users modify the query as well as run it.

Visual FoxPro does not support the Query Designer in an .EXE file. Consequently, if you’re distributing your application as an .EXE, you must change the menu command to “DO queryname.QPR”.  This command will run the query but won’t let users modify it.


Securing Reports in Visual FoxPro Project Manager