Re: Query By Example in 4GL
Posted in 1992
Quoting Dave Snyder: >Be careful of using INPUT instead of CONSTRUCT. Although you can create >your own WHERE clause based upon the user's input, the user won't be >able to specify ranges (ie. ":") or use "<" or use ">" or other things >that escape me right now. > Well Dave, it all depends on how sneaky you want to be. If you use CHAR fields for all of your inputs, including the numeric fields, the user can enter the Informix QBE special characters. Of course, you have to test for them which is rather tedious. The best reason for using this method is that it gives you some control over the users input. This allows you to reduce the number of extremely long-winded querys that can be generated with CONSTRUCT. I have not worked with 4.1's new CONSTRUCT options yet, though we have gotten it. Unfortunatly, when we compiled running 4.0 code under 4.1, there were quite a few run time errors. ----------------------------------------------------------------------------- Bob Kane Internet: bob@worms-emh2.army.mil (IP 134.235.9.2) TechDyn Systems Voice: (049) 6241-487306 (WORMS, GERMANY) CMR 421, BOX 706 Fax: (049) 6241-49560 APO AE 09056 CIS: 71054,2661