*!* What this demonstrates is executing a stored procedure *!* in an Oracle Package to create records in a temp table, *!* TEMP_TABLE. Then you can issue another SQLExec() to *!* retrieve those records. SQLEXEC(nHandle, 'delete from temp_table') lcSQL = "DECLARE " ; + " v_HistoryStudents ClassPackage.t_StudentIDTable; " ; + " v_NumStudents BINARY_INTEGER := 20; " ; + " BEGIN " ; + " ClassPackage.ClassList('HIS', 101," ; + " v_HistoryStudents, v_NumStudents);" ; + " FOR v_LoopCounter IN 1..v_NumStudents LOOP " ; + " INSERT INTO temp_table (num_col, char_col) " ; + " VALUES (v_HistoryStudents(v_LoopCounter), " ; + " 'In History 101'); " ; + " END LOOP; " ; + " END;" ? SQLEXEC(nHandle, lcSQL) ? SQLEXEC(nHandle, 'select * from temp_table', 'crsTest')Maybe you could use something much simplier than the above. Just a SWAG:
lcSQL = "DECLARE " ; + " BEGIN " ; + " MYSCHEME.MYPACKAGE.MYFUNCTION();" ; + " END;" ? SQLEXEC(nHandle, lcSQL)>I'm trying to run a Oracle 8i package that contains a function that returns as single numeric value. I can run SQL strings from SQLEXEC, but can't get these darned sprocs working. The package is compiled and I've tested it from SQL+, so it's not that..I've tried the following syntax: