Home » SQL & PL/SQL » SQL & PL/SQL » Error creating procedure
Error creating procedure [message #328988] Mon, 23 June 2008 12:09 Go to next message
klittl2
Messages: 6
Registered: June 2008
Location: Maryland
Junior Member
Hello,
Trying to create a PL/SQL script for a form but am getting these errors:

PLS-00306: wrong number or types of arguments in call to '||'
PL/SQL: Statement ignored

Heres the code:
htp.p('<script language="JavaScript" type="text/javascript">
<!--
document.forms[0].elements[9].disabled = true;
//--> 
</script>');

DECLARE
v_source VARCHAR2(50);

v_sessionid	NUMBER;

	 v_detail_id  number:= p_session.get_value_as_number(
	     p_block_name => 'DEFAULT',
	   p_attribute_name => 'A_detail_ID');


	 CURSOR c_detailrpt is
	   select ah_detail_id, filename, filetype
	 from ad_hoc_detail
	 where ad_ah_rpt_id = v_detail_id;

	rptdetail_desc  varchar2(2000);
	vlink            varchar2(256);
	v_current_created_by acquisitions.adhoc_rpt.created_by%TYPE;
BEGIN

select portal.wwctx_api.GET_USER INTO v_source FROM dual;
select portal.wwctx_api.get_sessionid() INTO v_sessionid FROM dual;

SELECT i.created_by
INTO v_current_created_by
FROM adhoc_rpt i
WHERE i.ah_rpt_id = v_detail_id;   

htp.p('
<script type="text/javascript" language="javascript">
	storeIncident(document.forms[0].elements[9].value);
	storeSessionSource("'||v_sessionid||'","'||v_source||'");
	document.getElementById("current_created_by").value = "'||v_current_created_by||'";
	document.getElementById("current_created_by").disabled = true;
</script>
');

htp.p('
</TD>
		</TR></table>
    </div>   
  </div>
</div>
</body>
</TD></TABLE></TD>');

htp.formOpen('PORTAL.wwa_app_module.link?
		p_arg_names=_moduleid
		&p_arg_values=62514652535
		&p_arg_names=detail_id
		&p_arg_values='||v_detail_id, 'post');

htp.formSubmit(NULL,'ADD File'); 

htp.formClose;

htp.p('<TABLE class="tbl">');
 for c in c_detailrpt
 LOOP

vlink := portal.wwv_user_utilities.get_url('acquisitions.ADHOC_RPT_LINK');

htp.p('<tr>');
htp.p('<td class="label">Detail ID</td>');
htp.p('<td class="field"><a href="'||vlink||'">'||c.ah_detail_id||'</a></td>');
htp.p('</tr>');

htp.p('<tr>');
htp.p('<td class="label">File Name</td>');
htp.p('<td class="field">'||c.filename||'</td>');
htp.p('</tr>');

htp.p('<tr>');
htp.p('<td class="label">File Type</td>');
htp.p('<td class="field">'||c.filetype||'</td>');
htp.p('</tr>');

htp.p('<tr>');
htp.p('</tr>');
htp.p('<tr>');
htp.p('</tr>');
htp.p('<tr>');
htp.p('</tr>');
htp.p('<tr>');
htp.p('</tr>');
 END LOOP;
 htp.p('</TABLE>');


 
 
END;




[Mod-edit: Frank added code tags]

[Updated on: Mon, 23 June 2008 12:11] by Moderator

Report message to a moderator

Re: Error creating procedure [message #328989 is a reply to message #328988] Mon, 23 June 2008 12:10 Go to previous messageGo to next message
klittl2
Messages: 6
Registered: June 2008
Location: Maryland
Junior Member
any help is appreciated.
thanks
Keith
Re: Error creating procedure [message #328991 is a reply to message #328988] Mon, 23 June 2008 12:11 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
http://www.orafaq.com/forum/t/88153/0/
Please read & follow posting guidelines as stated in URL above


are we supposed to guess which line is throw the error?

[Updated on: Mon, 23 June 2008 12:12] by Moderator

Report message to a moderator

Re: Error creating procedure [message #328992 is a reply to message #328989] Mon, 23 June 2008 12:14 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
htp.formOpen('PORTAL.wwa_app_module.link?
		p_arg_names=_moduleid
		&p_arg_values=62514652535
		&p_arg_names=detail_id
		&p_arg_values='||v_detail_id, 'post');


There is something missing after the v_detail_id, I think.
Next time, please provide the COMPLETE errormessage (including the linenumber, etc)
Also, enclose your code in code-tags, as described in the forum guide

[EDITED by LF: fixed OraFAQ Forum's Guide URL]

[Updated on: Mon, 23 June 2008 14:45] by Moderator

Report message to a moderator

Re: Error creating procedure [message #328994 is a reply to message #328988] Mon, 23 June 2008 12:24 Go to previous messageGo to next message
Kevin Meade
Messages: 2101
Registered: December 1999
Location: Connecticut USA
Senior Member
do some basic debugging. Comment out lines and then start introducing them back in one at a time or groups at at time, till you find the line that causes the error.

Kevin
Re: Error creating procedure [message #328995 is a reply to message #328988] Mon, 23 June 2008 12:26 Go to previous messageGo to next message
klittl2
Messages: 6
Registered: June 2008
Location: Maryland
Junior Member
110/7 PLS-00306: wrong number or types of arguments in call to '||'
110/1 PL/SQL: Statement ignored

which makes it this line:
110 htp.p('<td class="field">'||c.filename||'</td>');
Re: Error creating procedure [message #328996 is a reply to message #328988] Mon, 23 June 2008 12:27 Go to previous messageGo to next message
Kevin Meade
Messages: 2101
Registered: December 1999
Location: Connecticut USA
Senior Member
so when you comment out this line, all else works? Try it. That would be real proof.

Kevin
Re: Error creating procedure [message #328999 is a reply to message #328988] Mon, 23 June 2008 12:34 Go to previous messageGo to next message
klittl2
Messages: 6
Registered: June 2008
Location: Maryland
Junior Member
i will test that out.
thanks for the pointer.
Keith
Re: Error creating procedure [message #329000 is a reply to message #328988] Mon, 23 June 2008 12:36 Go to previous messageGo to next message
Kevin Meade
Messages: 2101
Registered: December 1999
Location: Connecticut USA
Senior Member
sorry, I didn't mean to be rude. Its just that I have seen so many times, Oracle give us line numbers where supposedly and the error was only to find out that it wasn't that line, mostly because something else was confusing it.

Good luck, Kevin
Re: Error creating procedure [message #329002 is a reply to message #328988] Mon, 23 June 2008 12:39 Go to previous messageGo to next message
klittl2
Messages: 6
Registered: June 2008
Location: Maryland
Junior Member
no its cool...I get this now



Error: An unexpected error occurred: ORA-06502: PL/SQL: numeric or value error (WWV-16016)

An unexpected error occurred: ORA-06502: PL/SQL: numeric or value error (WWV-16016)
(WWV-00000)

The preference path does not exist: ORACLE.WEBVIEW.PARAMETERS.62496410985 (WWC-51000)
Re: Error creating procedure [message #329004 is a reply to message #328988] Mon, 23 June 2008 12:41 Go to previous message
Kevin Meade
Messages: 2101
Registered: December 1999
Location: Connecticut USA
Senior Member
Boy! I am glad you get it. I never would have found that.

Kevin
Previous Topic: Insert statement from web apps resulted multiple records inserted into database problem
Next Topic: SORTING WITH ALPHA-NUMERIC
Goto Forum:
  


Current Time: Wed Dec 07 10:34:37 CST 2016

Total time taken to generate the page: 0.06507 seconds