Re: ORDER BY produces errors
Posted in 1995
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
Nils.Myklebust@ccmail.telemax.no wrote: : : 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. : Thank you and all the other people answered. I've fixed the problem, and the problem is not my code. It's the old question: Is it a bug or is it a feature? The table objekte contains among other fields a CHAR-field with about 3000 characters. But 4GL can, it semms to me, only handle variables altogether <= 4 KB! So I moved the long CHAR-field to an extra table - now my program works fine. I'm running INFORMIX-4GL Version 4.00.UE1 on a PC with INTERACTIVE UNIX. Rainer