Hi, I too am converting an old database with lots of SET POINTER commands. What I have found works is to use:
WHILE SQLCODE <> 100 THEN In place of any old line that looks like WHILE var = 0 THEN This seems to run the cursor/pointer through the data and stop at the end without any problems. Regards, Dave Fitts State of Maine -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Stas p. Gawel Sent: Friday, June 19, 2009 11:51 AM To: RBASE-L Mailing List Subject: [RBASE-L] - Converting from pointer to fetch Stas' Gawel [[email protected]] Tube Methods, Inc. 610-279-7700 I am converting an rbase command file from an older version of rbase to rb8 but I do not know how to completely convert the pointer command. This is the old syntax involving the pointer command SET POINTER #1 STAT1 FOR ICMAIN WHERE + INHOUSE = "Y" SORTED BY ITEM# WHILE STAT1 = 0 THEN SET VAR ITEM# = ITEM# IN #1 SET VAR COSTLBS = COSTLBS IN #1 SET VAR VALUE = VALUE IN #1 SET VAR INWEIGHT = INWEIGHT IN #1 SET VAR DATERCVD = DATERCVD IN #1 SET VAR INHOUSE = INHOUSE IN #1 NEXT #1 STAT1 ENDWHILE This is as far as I got. DECLARE cursor1 CURSOR FOR SELECT itemnumber, + iccostlbs, icvalue, inweight, datereceived, inhouse + FROM icmain WHERE inhouse CONTAINS 'Y' + ORDER BY itemnumber ASC WHILE STAT1 = 0 THEN FETCH FROM cursor1 INTO itemnumber, iccostlbs, + icvalue, inweight, datereceived, inhouse ENDWHILE I am having trouble with what STAT1 is and what it should be converted to. Also, I receive the error message -ERROR- The cursor [cursor1] is already defined. (708) but I have checked and my syntax appears to be right for the declare and fetch commands. Note that some of the coulumn names changed from the older version of the table and the newer one though the table name is still the same and that this is not the whole program.

