Re: Need help with DISPLAY ARRAY problem
Posted in 1993
From John O'Sullivan: * * * * 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. You need to tell informix how many lines are in the array by using the SET_COUNT( # ) function. Change your code to the following: DEFINE num_rows SMALLINT OPEN FROM fba_stats FROM "fba_stats" DISPLAY FORM fba_stats LET num_rows = ? # Replace the ? with number of rows in array CALL SET_COUNT(num_rows) DISPLAY ARRAY p_player TO player.* Robert Minter |Data Systems Support| \\\\\\_/// Programmer, Software Development | Orange, CA | ( _ _ ) internet: rob@dssmktg.com | Tel: 714.771.0454 | (| ^ |) bangpath: uunet.uu.net!dssmktg!rob| Fax: 714.771.3028 | \\`-'/ I used to not know, now I know I don't know. \\_/