Re: Need help with DISPLAY ARRAY problem
Posted in 1993
->Subject: Need help with DISPLAY ARRAY problem ->To: informix-list@rmy.emory.edu ->Date: Wed, 22 Dec 93 7:25:48 PST ->From: John O'Sullivan <johno@access.isc-br.com> -> ->Hi, -> -> I need some help. I am new to Informix - so new I am using ->Informix 4GL 1.10. I am learning this using the Users Guide but applying ->it to my own application. I am having the following problem: -> -> OPEN FROM fba_stats FROM "fba_stats" -> DISPLAY FORM fba_stats -> -> DISPLAY ARRAY p_player TO player.* -> ->The above syntax is right from the guide. But nothing displays in the ->form fields. The form displays but no info. I have verified that there ->is valid data in all the record fields of p_player. I did this by displaying ->all the values of p_player right before the DISPLAY ARRAY statement. -> ->The record layout of the screen array, player, is the same as the program ->array, p_player which they need to be. Can anyone help? -> ->Also, while debugging the C code of this prog, I noticed that after certain ->statements, a variable "status" is checked. I am assuming this is the ->return status value of the just executed Informix statement. First, is that ->a true statement and 2nd is there any way in a 4GL program to check the ->status of an executed statement i.e. the DISPLAY ARRAY statement. -> ->Thanks for any help. -> ->johno@access.isc-br.com Good morning, John, Before you do a DISPLAY ARRAY, you must call the Informix supplied function SET_COUNT() to tell Informix how many rows are in the array. Look for a section "4GL Function Library" in your 4GL Reference, probably volume 1. STATUS is a global variable available to your 4GL program. To fully use it, you must state WHENEVER ERROR CONTINUE before running the SQL statement(s). Otherwise, Informix will trap your errors for you and abort the program upon an abnormal condition. Look up WHENEVER ERROR {STOP|CONTINUE} in your ref. manual for more info. Also look up SQLCA.SQLCODE, which is the other way of getting STATUS information. STATUS and SQLCA.SQLCODE come in three flavors: =0 means success, =100 (or global variable NOTFOUND) means no data found or end of data for a cursor, <0 means an error. (All error conditions have negative values.) I have used I4GL 2.10/4.00/4.10, so some of this may not apply to 1.10; however, it is pretty basic stuff and was probably in there from the start. If you have more questions, give me a call. Regards, Alan ___________________________ ______________________| R. Alan Popiel |__________________________ \\ Internet: | Martin Marietta, SLS | / \\ alan@den.mmc.com | P.O. Box 179, M/S 3810 | Std disclaimers apply. / )Voice: | Denver, CO 80201-0179 USA | ( / 303-977-9998 |___________________________| (But you knew that!) \\ /________________________) (____________________________\\