Re: ORDER BY produces errors
Posted in 1995
: rs@jengate.thur.de (Rainer Sokoll) writes: : DEFINE such RECORD LIKE objekte.* : : MAIN : DECLARE such_curs CURSOR FOR SELECT * FROM objekte : where makler = 500 : ORDER BY dm_preis DESC : open such_curs : foreach such_curs into such.* : display such.* : end foreach : close such_curs : END MAIN : : If there are more then 2 rows corresponding to the SELECT, INFORMIX says: : : Program stopped at "test_obj.4gl", line number 21. : SQL statement error number -408. : Invalid message type received from the sqlexec process. The foreach statement does the equivalent of an open and fetch (and close at the end). May be if you remove the statement open such_curs it will work. You shouldn't have gotten a 408 error, but at least you will have a correct program to work with if you still get errors. Nils.Myklebust@ccmail.telemax.no NM-data, Dalsbergstien 7, N-0170 Oslo, Norway My opinions are those of my company