Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> How can i use table type variables with DBMS_SQL.DEFINE_COLUMN in OWS21 ?

How can i use table type variables with DBMS_SQL.DEFINE_COLUMN in OWS21 ?

From: Massimo Trento <nsi_at_tornado.be>
Date: 1997/10/29
Message-ID: <34574c6a.24923195@news.tornado.be>#1/1

        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 :



procedure DynaQuery2 ( TableLabels in owa_util.ident_arr,
			TableValeurs in owa_util.ident_arr,
			TableSelect in owa_util.ident_arr,
			QueryTable in varchar2,
			HtmlBloc out varchar2 ) is

-- owa_util.ident_arr is defined as folows : type ident_arr is table

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 .........


Received on Wed Oct 29 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US