Cursor syntax

If the Cursor definition syntax has redundant statements, for example, into, as shown in the example below, 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 ;