Re: Initial Row with Display Array
Posted in 1995
Topics: Stored Procedures & SPL
Darrell S. Thacher (darrell@gteens.com) wrote:
: I would like to begin my DISPLAY ARRAY and force a record other than the
: first to be the current record-array row--yet still have the capability of
: scrolling up or down through the complete list.
: In other words if a user enters "DE" and then Control-B to pop-up a list of
: states I want DELAWARE to be the first state listed yet have the capability
: of scrolling up or down through a list of all the states.
: Is there an equivalent to arr_curr() which, instead of returning the
: current record-array row, sets the current row prior to the DISPLAY ARRAY
: call?
: +------------------------------+
: | Darrell S. Thacher |---------------------------------------+
: | darrell@gteens.com | GTE Educational Network Services |
: +------------------------------+ Irving, TX |
: | (214) 518-8512 |
: +-----------------------------------------+
I dont know what your limitations are as far as the
number of selects you (want or can) do during processing
but here is how i would do it
SELECT state_name
INTO state_arr[1].state_name
FROM states
WHERE state_name = arg_passed_in
DECLARE state_curs CURSOR FOR
SELECT state_name
FROM states
LET counter = 2
FOREACH state_curs INTO statename
LET state_arr[counter].state_name = statename
LET counter = counter + 1
END FOREACH
DISPLAY ARRAY
.
. so and so forth
I dont know if this wil work for you but it's just my
2 cents worth
Eric Scherer
erics@winternet.com