Cursor syntax

When declaring a cursor, it is not a recommended practice to add the into keyword. PowerBuilder will consider it redundant and ignore it; while PowerServer will consider it (ls_result in the following example) as a parameter and will display the error: The number of parameters does not match.

string ls_sql, ls_result
ls_vid = '100002'
ls_vname = ''
DECLARE my_cursor DYNAMIC CURSOR FOR SQLSA ;
ls_sql = 'SELECT v_name into :ls_result  FROM employee WHERE v_id = ?'
PREPARE SQLSA FROM :ls_sql ;
OPEN DYNAMIC my_cursor using :ls_vid ;
FETCH my_cursor INTO :ls_vname ;
CLOSE my_cursor ;