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.
|
1 2 3 4 5 6 7 8 9 |
string ls_sql, ls_result ls_vid = '100002' ls_vname = '' DECLARE my_cursor DYNAMIC CURSOR FOR SQLSA ; ls_sql = 'SELECT v_name <span><strong>into :ls_result</strong></span> 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 ; |
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest