Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> How can i use table type variables with DBMS_SQL.DEFINE_COLUMN in OWS21 ?
Hi.
I have to write a procedure to define dynamic fields for my query and
the only dynamic
way i need to pass dynamic number of argument is throught a varchar2
table. But the problem is that
the function DBMS_SQL.DEFINE_COLUMN doesn't accept table type
variables.
I'm using Oracle Web Server 2.1 / WIN NT4.
Any help would be apreciated.
Thanx in advance.
here's a sample of the code i wrote :
TableValeurs in owa_util.ident_arr, TableSelect in owa_util.ident_arr, QueryTable in varchar2, HtmlBloc out varchar2 ) is
begin
...... SNIP ........
for i in 1..elem loop if TableSelect(i) IS NULL then exit; end if;
DBMS_SQL.DEFINE_COLUMN(ReqCursor,i,DynColumns(i),30);
end loop;
...... SNIP ........
loop ignore := DBMS_SQL.FETCH_ROWS(ReqCursor); if ignore >0 then begin for i in 1..elem loop DBMS_SQL.COLUMN_VALUE(ReqCursor,i,DynColumns(i)); end loop;
....... SNIP .........