SQL Expression
Builder
User-defined, Ad-hoc SQL Expression
Builder
for Visual FoxPro
Version 1.20
Released 11/11/2004
For VFP 7 - 9

SQL Expression Builder allows users to specify
one or more selection criteria
right from the existing fields on their forms.
(See the sample form demo
included with the Evaluation Download)
|
Some ways to use SQL Expression Builder:
|
|
|
Demo of using SQL Expression Builder

The Evaluation Download includes the above sample form.
Right-click on a field and select "Filter on this Item".
This brings up the Expression Builder.
After an expression is defined, the form re-queries the cursor bound to the grid using SQL.
The new subset of records is displayed and the current "Nice" filter expression is shown above.
There is very little code required. Download the evaluation and run the form, ExprDemo.scx.
The Expression Builder Form

The selections across the top read like an expression (State Code Is In the list ...).
Notice this form looks different from the one at the top of this page. This shows that you can optionally "hide" various user options, as needed.
The user-selected Value(s) can be entered manually, or the users can press the "Lookup value(s)" button.
The "Lookup value(s)"
button is a powerful feature:
When calling Expression Builder, you can specify a "master" lookup table
and field to use
for selecting values from. The button lets users select single or multiple values from the source
table,
a
master
table, a codes table or even remote (non-FoxPro) tables using SQL Pass-thru.
You can even specify to optionally create the lookup table on the fly, based
on certain criteria, such as the user's security settings for instance.
The Available Operators to choose from are:
"Equal to"
"Blank, Zero or Null"
"Containing the text"
"In the list"
"Less than"
"Less than or equal to"
"Greater than"
"Greater than or equal to"
"Between"
"Like"
"Logically true"
Users can specify how expressions are linked together by selecting to Precede the expression with AND or OR. (hidden on this form, see form at the top of this page).
The user can also select to precede the expression with "Blank", which can be used as a signal to clear the previous selection criteria.
SQL Injection type query commands are also checked for and disallowed.
Date Selector Popup

Users can easily specify dates for their value(s) using the Calendar Popup button.
The Calendar Popup is 100% FoxPro, so there are no ActiveX controls required.
Dates and Date/Times are formatted correctly for SQL and Filter expressions.
They are also formatted for SQL pass-thru to remote databases.
Lookup Value(s)

Users can easily select value(s) from "master" lookup tables by pressing the Lookup Value(s) button.
This option can be specified to point to one of your master tables.
This option can also be directed to create an SQL lookup cursor "on the fly".
Therefore, your lookup table can be anything you like, such as, a list of Active Projects, for example.
![]()
Implementing Expression Builder
There's More...
Expression Builder is 100% FoxPro (no external binaries, libraries or ActiveX controls). It is compact, easy to use, and includes complete Documentation, and fully Commented Source code.
![]()
SQL Expression Builder for VFP 7 -
9: $ 78
Includes: |
Click on the Windows Media Video below to
see a demo of Expression Builder.
ExprBuilderDemo.wmv |
|
The following evaluation is
available for download.
Download ExprBuilder09e.zip for VFP9 |
|
Support 'at' UserQ.com (Change 'at' to @) Give it a try! |
To see UserQ and Expression Builder in action, take a look at our Vacation Rental Software for vacation rental properties at: www.VacationRentPro.com
* FoxPro, Visual FoxPro, Windows, SQL Server and Rushmore are registered trademarks of Microsoft Corporation.
Bookmark this page to check for new versions.
(C) Copyright 1996 - 2008 Mark Harpenau, All
Rights Reserved.