Home » SQL & PL/SQL » SQL & PL/SQL » PLS-00306: wrong number or types of arguments in call to 'QDA_TBL' (Oracle 10g XE)
PLS-00306: wrong number or types of arguments in call to 'QDA_TBL' [message #290621] Sun, 30 December 2007 21:00 Go to next message
ashokojha
Messages: 1
Registered: December 2007
Junior Member
Not able to find why I am getting error
PLS-00306: wrong number or types of arguments in call to 'QDA_TBL'

I get error in this line
param_var(param_var.Last) := QDA_TBL(v_Section, v_ParamName, v_ParamValue);


I also tried to set values for my variables like
   v_Section := 'A'
   v_ParamName := 'B';
   v_ParamValue := 'C';

but same error

Thanks for you help - Ashok

CREATE OR REPLACE TYPE QDA_TYPE as object 
(
Section VARCHAR2(1), 
ParamName VARCHAR2(500), 
ParamValue VARCHAR2(8000)
)
/

CREATE OR REPLACE TYPE  QDA_TBL is table of qda_type
/
 

create or replace function QDAParamTable(sourcestring in varchar2)
RETURN QDA_TBL
as
param_var QDA_TBL := QDA_TBL();
str VARCHAR2(8000);
strlen number; 
len number;
v_Section VARCHAR2(1); 
v_ParamName VARCHAR2(500);
v_ParamValue VARCHAR2(8000);
begin
str := sourcestring;
len := 0;
strlen := length(str);
while strlen > len 
loop
   v_Section := SUBSTR(str,1,1);
   v_ParamName := SUBSTR(str,INSTR(';;', str)+2, INSTR('^^', str)- 4);
   v_ParamValue := SUBSTR(str, INSTR('^^', str) + 2, INSTR('~', str)- (INSTR('^^', str) + 2));
   param_var.extend;
   param_var(param_var.Last) := QDA_TBL(v_Section, v_ParamName, v_ParamValue);
  len := len + 1;
end loop;
RETURN param_var;
end;
Re: PLS-00306: wrong number or types of arguments in call to 'QDA_TBL' [message #290638 is a reply to message #290621] Mon, 31 December 2007 00:11 Go to previous message
rajavu1
Messages: 1574
Registered: May 2005
Location: Bangalore , India
Senior Member

Change it to

 param_var(param_var.Last) :=QDA_TYPE (v_Section, v_ParamName, v_ParamValue);


Thumbs Up
Rajuvan.
Previous Topic: how to fetch a row by row using sql
Next Topic: how to excute the output from query
Goto Forum:
  


Current Time: Sat Dec 10 10:44:40 CST 2016

Total time taken to generate the page: 0.08877 seconds