Path: utzoo!attcan!uunet!cs.utexas.edu!sun-barr!apple!olivea!oliveb!pyramid!infmx!davek From: davek@informix.com (David Kosenko) Newsgroups: comp.databases Subject: Re: Informix 4GL CONSTRUCT question Message-ID: <1990Oct4.141922.5268@informix.com> Date: 4 Oct 90 14:19:22 GMT References: <59771@bbn.BBN.COM> Sender: news@informix.com (Usenet News) Distribution: na Organization: Informix Software, Inc. Lines: 28 In article <59771@bbn.BBN.COM> eboneste@BBN.COM (Liz Bonesteel) writes: > ascertain which form is open > CONSTRUCT the query on that form > close the form and open the next form > CONSTRUCT the query on that form > concatenate the queries and PREPARE the select statement > >The program compiles, but when I try to run it I get an error: > > An illegal character has been found in this statement. > >This error occurs in the PREPARE statement. > >Does anybody know of a way around this, or is it really impossible to >query on multible forms in 4GL? I suspect the problem has nothing to do with the CONSTRUCT itself; indeed, what you are doing is possible and often desirable. The problem is with the character string you build - the parser has found a problem with the query string you are using. When you concatenate the queries, are you including an AND to join the results of the two constructs? Remember that a construct returns a bunch of boolean conditions that are meant to be tacked on following a WHERE clause; if you plug two constructed clauses together you need to put that AND in to link the conditions together. Dave Kosenko Informix Prof. Services