Example: lrd_bind_cursor

In the following example, the lrd_bind_cursor function binds a cursor, Csr1, to the placeholder Cursor1 to create a new bound cursor, Csr2. The contents of the new cursor are retrieved using lrd_fetch.   

lrd_stmt(Csr1, "BEGIN open :Cursor1 for select empno from emp where empno "
                    "<> 1000; END;", -1, 0, 1, 0);
lrd_bind_cursor(Csr1, "Cursor1", 0, &Csr2, 0);
lrd_exec(Csr1, 0, 0, 0, 0, 0);
lrd_bind_col(Csr2, 1, &EMPNO_D2, 0, 0);
lrd_fetch(Csr2, -14, 1, 0, PrintRow2, 0);