 




<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>IT Answers &#187; Creating Oracle packages</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/tag/creating-oracle-packages/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers</link>
	<description></description>
	<lastBuildDate>Wed, 22 May 2013 14:27:36 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Oracle Package Script</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/oracle-package-script/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/oracle-package-script/#comments</comments>
		<pubDate>Thu, 02 Jun 2011 16:11:23 +0000</pubDate>
		<dc:creator>pforos</dc:creator>
				<category><![CDATA[Creating Oracle packages]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Oracle Application Express]]></category>
		<category><![CDATA[Oracle Package]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Hello everyone&#8230;  I&#8217;m trying to create a package for an application on oracle APEX!! Here&#8217;s the code I used:  create or replace package customer_authentication as function customer_exists (p_email in varchar2) return boolean; procedure insert_new_customer ( p_fullname in varchar2, p_email in varchar2, p_password in varchar2); function customer_authentication_f ( p_username in varchar2 default null, p_password in varchar2 [...]]]></description>
				<content:encoded><![CDATA[<p>Hello everyone&#8230; </p>
<div></div>
<div>I&#8217;m trying to create a package for an application on oracle APEX!!<br />
Here&#8217;s the code I used: </div>
<div>
<pre></div>
<div>
<div>create or replace package customer_authentication</div>
<div>as</div>
<div>function customer_exists (p_email in varchar2) return boolean;</div>
<div></div>
<div>procedure insert_new_customer (</div>
<div>p_fullname in varchar2,</div>
<div>p_email in varchar2,</div>
<div>p_password in varchar2);</div>
<div></div>
<div>function customer_authentication_f (</div>
<div>p_username in varchar2 default null,</div>
<div>p_password in varchar2 default null)</div>
<div>return boolean;</div>
<div></div>
<div>end customer_authentication; --end of package specification</div>
<div></div>
<div></div>
<div>create or replace package body customer_authentication</div>
<div>as</div>
<div>function customer_exists (p_email in varchar2)</div>
<div>return boolean;</div>
<div>as</div>
<div>l_aux number;</div>
<div>begin</div>
<div>select id</div>
<div>into l_aux</div>
<div>from customer</div>
<div>where upper(email) = upper (p_email);</div>
<div>return true;</div>
<div>exception when no_data_found then return false;</div>
<div>end customer_exists;</div>
<div></div>
<div></div>
<div>function password_hashing (</div>
<div>p_username in varchar2,</div>
<div>p_password in varchar2)</div>
<div>return varchar2</div>
<div>as</div>
<div>l_password varchar2(4000);</div>
<div>l_salt varchar2(4000) := 'AA8V33PFKQHFZJ4T54HOATVML024FM';</div>
<div></div>
<div></div>
<div>begin</div>
<div>l_password := utl_raw.cast_to_raw(</div>
<div>dbms_obfuscation_toolkit.md5(</div>
<div>input_string =&gt; p_password ||</div>
<div>substr(l_sault, 10, 13) ||</div>
<div>p_username ||</div>
<div>substr(l_sault, 4, 10)</div>
<div>)</div>
<div>);</div>
<div>return l_password;</div>
<div>end password_hashing;</div>
<div></div>
<div></div>
<div></div>
<div>procedure insert_new_customer (</div>
<div>p_fullname in varchar2,</div>
<div>p_email in varchar2,</div>
<div>p_password in varchar2)</div>
<div>as</div>
<div>l_encrypted_password varchar(32);</div>
<div>begin</div>
<div>l_encrypted_password := password_hashing (upper(p_email), p_password);</div>
<div>insert into customer (fullname, email, encrypted_password)</div>
<div>values (p_fullname, lower(p_email), l_encrypted_password);</div>
<div>commit;</div>
<div>end insert_new_customer;</div>
<div></div>
<div>function customer_authentication_f (</div>
<div>p_username in varchar2,</div>
<div>p_password in varchar2)</div>
<div>return boolean</div>
<div>as</div>
<div>l_aux number; --boithitiki metablhth</div>
<div>l_encrypted_password varchar2(32)</div>
<div>begin</div>
<div>/* kryptografish toy password */</div>
<div>l_encrypted_password := password_hashing (</div>
<div>p_username =&gt; upper(p_username),</div>
<div>p_password =&gt; p_password );</div>
<div>select id</div>
<div>into l_aux</div>
<div>from customer</div>
<div>where upper(email)=upper(p_username)</div>
<div>and encrypted_password=l_encrypted_password;</div>
<div>return true;</div>
<div>exception</div>
<div>when no_data_found then return false;</div>
<div>end customer_authentication_f;</div>
<div>end customer_authentication; -- end of package body</div>
</div>
<div></pre>
</div>
<div></div>
<div>I tried running it through the SQL Workshop (commands) but after pressing the &#8220;run&#8221; button, a pop up window came up with only a Submit button!! (?)</div>
<div>After pressing it, it gave me the message<br />
&#8220;Not found</div>
<div>The requested URL /apex/www_flow.show was not found on this server&#8221;</p>
</div>
<div>So, my question is: Is everything alright with the script? The error is just because I pushed submit without any given data??? <img src='http://itknowledgeexchange.techtarget.com/itanswers/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>Thanx for your time&#8230;</p></div>
<div>Peter</div>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/oracle-package-script/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Errors in Creating Oracle packages</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/errors-in-creating-oracle-packages/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/errors-in-creating-oracle-packages/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 13:04:21 +0000</pubDate>
		<dc:creator>Shreeshonkar</dc:creator>
				<category><![CDATA[Creating Oracle packages]]></category>
		<category><![CDATA[Oracle development]]></category>
		<category><![CDATA[Oracle Package]]></category>
		<category><![CDATA[Oracle SQL]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Can anybody plz find out the error in the following code?? plz reply back. SQL&#62; CREATE OR REPLACE package body PKG_IMAGEM1 2 as 3 PROCEDURE IMGINSERT1(P_Region IN VARCHAR2, 4 P_College IN VARCHAR2, 5 P_CourseCat in varchar2, 6 P_CourseName in varchar2, 7 P_StudentName in varchar2, 8 P_ID in varchar2, 9 P_FileName in varchar2, 10 P_IMG IN [...]]]></description>
				<content:encoded><![CDATA[<p>Can anybody plz find out the error in the following code??<br />
plz reply back.</p>
<p>SQL&gt; CREATE OR REPLACE package body PKG_IMAGEM1<br />
  2  as<br />
  3  PROCEDURE IMGINSERT1(P_Region IN VARCHAR2,<br />
  4                      P_College IN VARCHAR2,<br />
  5        P_CourseCat in varchar2,<br />
  6        P_CourseName in varchar2,<br />
  7        P_StudentName in varchar2,<br />
  8        P_ID in varchar2,<br />
  9        P_FileName in varchar2,<br />
 10        P_IMG IN BLOB);<br />
 11  Insert into DocumentsSubmitted(RegionCode,CollegeCode, CourseCategory, CourseName, StudentFullN<br />
ame, ID, FileName, ImageField) values(P_Region,P_College,P_CourseCat, P_CourseName, P_StudentName, P<br />
_ID, P_FileName, P_IMG );<br />
 12  END PKG_IMAGEM1;<br />
 13  /</p>
<p>Warning: Package Body created with compilation errors.</p>
<p>SQL&gt; show err;<br />
Errors for PACKAGE BODY PKG_IMAGEM1:</p>
<p>LINE/COL ERROR<br />
&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
11/1     PLS-00103: Encountered the symbol &#8220;INSERT&#8221; when expecting one of<br />
         the following:<br />
         begin end function package pragma procedure subtype type use<br />
         &lt;an identifier&gt; &lt;a double-quoted delimited-identifier&gt; form<br />
         current cursor<br />
         The symbol &#8220;begin&#8221; was substituted for &#8220;INSERT&#8221; to continue.</p>
<p>SQL&gt;</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/errors-in-creating-oracle-packages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 3/16 queries in 0.023 seconds using memcached
Object Caching 394/427 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-22 18:42:52 -->