#include #include #include char *plsqlb(x) int x; { EXEC SQL BEGIN DECLARE SECTION; int xx = x; static char buffer[256]; EXEC SQL END DECLARE SECTION; Exec Sql Execute Declare Type infr Is Record(name Varchar2(20), status Varchar2(30)); Type infrt Is Table Of infr; empr infrt; Begin Begin Execute Immediate 'Select name, status From infrnd' Bulk Collect Into empr; Execute Immediate 'select ''' || empr(:xx).name || ' - ' || empr(:xx).status || ''' From Dual' Into :buffer; Exception When Others Then Execute Immediate 'select ''Hiba:' || SQLCODE || '...' || SQLERRM || '''' Into :buffer; End; End; End-Exec; return buffer; }