lcSQL = 'DECLARE ' lcSQL = lcSQL + 'TYPE CURSOR_TYPE_1 IS REF CURSOR; ' lcSQL = lcSQL + 'report_cursor CURSOR_TYPE_1; ' lcSQL = lcSQL + 'record_0 RFI.GET_TODAY_TEST_PKG.REPORT_RECTYPE; ' lcSQL = lcSQL + 'BEGIN ' lcSQL = lcSQL + " get_today_test_proc(report_cursor," + [']+ lcCompany + ['] + ',' + ['] +lcwarehouse + ['] + "); " lcSQL = lcSQL + ' END; ' lnRetVal = SQLEXEC(lnHandle, lcSQL,'Todays_View')I should get a cursor called 'Todays_view' with the result set that the