4GL Construct Problems
Posted in 1994
Hello, netters I am running into two problems with the generation of "where-clauses" using the 4GL "construct" feature. Both where-clauses are legal, and work fine from within SQL. 1) Querying on BLOBS: It is legal, in SQL, to query "... WHERE blob_field IS NULL" and to query "... WHERE blob_field IS NOT NULL". In 4GL, the construct routine converts the string "=" in the blob field in a form to the string "blob_field IS NULL". Great. But, it won't convert "!=" or "<>" to the string "blob_field IS NOT NULL". Rotten! You get the screen error message: "Error in field". Informix has given this a bug #: 23491 2) Generating a "NOT MATCHES" clause via the construct routine is impossible. In SQL, the clause "... WHERE my_char_field MATCHES "AB*" works great, likewise the clause "... WHERE my_char_field NOT MATCHES "AB*". In 4GL, typing "AB*" in a field during a query generates "my_char_field MATCHES "AB*". Great again. But, "!=AB*" generates "my_char_field <> "AB*", not the same. Typing: "[^A][^B]*" discards every record that starts with "A" and discards every record whose second character is "B". Not the same as discarding every record that starts with "AB". Informix has made improving this a feature request. The only solution I see are to have a "ON-KEY CLAUSE" that the user can press when one of these clauses is desired, and generating a separate string myself to tack on the the rest of the where-clause. Any other suggestions? If you think these features should be available within the standard Construct routine, please let Informix know, so that they may be added to a release soon. -- Colin McGrath Internet: colin@scdipc0.ueci.com Raytheon Engineers & Constructors Inc. UUCP: ..!uunet!trac2000!trac3000!cmm 30 S. 17th St Voice: 215-422-3449 Philadelphia, PA, 19101 FAX: 215-422-3363