Consultor Eletrônico



Kbase 12369: FETCH cursor into & error 1206
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/10/1998
FETCH cursor into & error 1206

When you use the following code, PROGRESS generates a "Count of INTO
variables does not match SELECT list. (1206)" error message if the
fields (columns) in the FETCH statement are not separated by
commas.

In addition, the following code does not print the desired information
to a file if the DISPLAY field-names statement is in the repeat loop.

DEF VAR vcust LIKE ncust.cust-num.
DEF VAR vname LIKE ncust.name.
OUTPUT TO out.file PAGED PAGE-SIZE 60.
DECLARE c1 CURSOR FOR SELECT * FROM ncust.
OPEN c1.
REPEAT:
FETCH c1 INTO vcust, vname. /*if there is no comma between vcust
and vname, error 1206 is generated */
END.
DISPLAY vcust vname. /*if this display statement resides prior to
the end of the repeat loop, no information
is displayed and, in some cases, the code
seems to hang.*/
END.

Progress Software Technical Support Note # 12369