<?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>Oracle Bangladesh</title>
	<atom:link href="http://www.oraclebd.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.oraclebd.com</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Tue, 10 Jan 2012 04:36:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Displaying HTML Pages within APEX</title>
		<link>http://www.oraclebd.com/displaying-html-pages-within-apex/</link>
		<comments>http://www.oraclebd.com/displaying-html-pages-within-apex/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 10:34:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.oraclebd.com/?p=80</guid>
		<description><![CDATA[As a large company we already have a number of software products available using different technologies, like Oracle Forms. Because of this we have a number of teams, like the Technical Authoring Team, who are dedicated to providing a service for all the products. The Technical Authoring Team provide help pages, user guides and release [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">As a large company we already have a number of software products available using different technologies, like Oracle Forms. Because of this we have a number of teams, like the Technical Authoring Team, who are dedicated to providing a service for all the products. The Technical Authoring Team provide help pages, user guides and release notes for all products. The Configuration Management Team provide installation guides, packaged software and upgrade support for all products. Now that we’re starting to use APEX we don’t want an additional overhead of having to provide a different service specifically for this product. However, as a web application, users want to be able to access things like Help documentation easily and would want to be able to add to this documentation.</p>
<p style="text-align: justify;">For our other products the Tech Authoring Team produce HTML pages using RoboHelp, one page for every web page or Oracle Form we’ve developed. Our Oracle Forms product has a table that lists the form name and the associated HTML page for the help. There is a link in this product which opens up an Internet browser on the HTML page stored.</p>
<p style="text-align: justify;">The Tech Authors want to continue using RoboHelp to produce a HTML page for every application page in our APEX application. The users want a link to view this web page within the application and add their own help to detail their business process or provide custom notes for the page.</p>
<p style="text-align: justify;">To keep everyone happy I’ve added a navigation bar entry to take users to a generic Help page (Page 3 in the application) setting a hidden item called P3_PAGE_NO on this page to be the page number of the page you’ve come from. I’ve also created another hidden item to hold the name of the HTML page that the Tech Authors have created. We’ve yet to decide if the HTML pages will be the page number e.g. 1.html, or the name of the page e.g. home.html.</p>
<p style="text-align: justify;">There is then a HTML region which uses iFrames to display the Tech Authors HTML page within the APEX page. The code in this region is as follows:</p>
<p style="text-align: justify;"><strong>&lt;iframe id=&#8221;companyhelp&#8221;</strong></p>
<p style="text-align: justify;"><strong>src=&#8221;/i/themes/company/help/index.html&#8221;</strong></p>
<p style="text-align: justify;"><strong>width=&#8221;100%&#8221; height=&#8221;500&#8243;&gt;</strong></p>
<p style="text-align: justify;"><strong>&lt;/iframe&gt;</strong></p>
<p style="text-align: justify;"><strong>&lt;script language=&#8221;javascript&#8221;&gt;</strong></p>
<p style="text-align: justify;"><strong>page = document.getElementById(&#8220;P3_HTML_PAGE&#8221;).value</strong></p>
<p style="text-align: justify;"><strong>if (page) {</strong></p>
<p style="text-align: justify;"><strong>url=&#8221;/i/themes/company/help/&#8221;+page+&#8221;.html&#8221;</strong></p>
<p style="text-align: justify;"><strong>document.getElementById(&#8220;companyhelp&#8221;).src=url</strong></p>
<p style="text-align: justify;"><strong>}</strong></p>
<p style="text-align: justify;"><strong>&lt;/script&gt;</strong><br />
If P3_HTML_PAGE holds the name of a HTML page then this HTML page is displayed. If it doesn’t then index.html is displayed, which currently says “No Help is available for this page.”</p>
<p style="text-align: justify;">To allow users to add to this Help, I’ve created a basic table holding the page number and custom help. There is another region on this page displaying the information from this table for the page in P3_PAGE_NO, with an edit link taking the user to another page with a HTML editor field which allows then to enter and update their version of the help they want to provide users.</p>
<p style="text-align: justify;">When changing to use new technologies it is often unreasonable for all the people within a company to change the way they work. Understandably our Tech Authors want to continue to use RoboHelp to create HTML pages instead of writing pages or adding Help to the APEX Application. Using iFrames in the way detailed above has allowed the Tech Authors to continue working in the way they are comfortable with but users will still see this help with the same look and feel as if we had written it within the APEX application.</p>
<p style="text-align: justify;">Source : apex-blog.com</p>]]></content:encoded>
			<wfw:commentRss>http://www.oraclebd.com/displaying-html-pages-within-apex/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Changing the Login and Start Pages</title>
		<link>http://www.oraclebd.com/changing-the-login-and-start-pages/</link>
		<comments>http://www.oraclebd.com/changing-the-login-and-start-pages/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 09:46:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle Apex]]></category>

		<guid isPermaLink="false">http://www.oraclebd.com/?p=77</guid>
		<description><![CDATA[Sometimes the simplest things make the biggest difference. Some users want to see a summary screen when they access an application, others want to get straight to business. If we can reduce the number of clicks required to get users to their desired page then we have happy customers. So how can you tailor your [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes the simplest things make the biggest difference. Some users want to see a summary screen when they access an application, others want to get straight to business. If we can reduce the number of clicks required to get users to their desired page then we have happy customers. So how can you tailor your APEX application so that users aren’t just taken to Page 1 when they log in? And what if you don’t want to have page 101 as your login page?</p>
<h3><span style="color: #ff0000;">Changing the Start Page</span></h3>
<p>If you take a look at the login page that’s been created for your application you’ll see there is a process on the page called <strong>login. </strong>The source for this process should be something like:</p>
<p><code>wwv_flow_custom_auth_std.login(<br />
P_UNAME =&gt; :P2_USERNAME,<br />
P_PASSWORD =&gt; :P2_PASSWORD,<br />
P_SESSION_ID =&gt; v('APP_SESSION'),<br />
P_FLOW_PAGE =&gt; :APP_ID||':1'<br />
);</code></p>
<p>P_FLOW_PAGE determines the page the user is redirected to after logging in. You could easily change this to be hard-coded to a different page, a dynamically determined page or a page stored for each user in a table.</p>
<p>For example:</p>
<p><code>DECLARE<br />
v_start_page number(10);<br />
BEGIN<br />
BEGIN<br />
SELECT start_page<br />
INTO v_start_page<br />
FROM apex_users<br />
WHERE upper(name) = upper(:P2_USERNAME);<br />
EXCEPTION<br />
WHEN no_data_found THEN<br />
v_start_page := 1;<br />
END;<br />
wwv_flow_custom_auth_std.login(<br />
P_UNAME =&gt; :P2_USERNAME,<br />
P_PASSWORD =&gt; :P2_PASSWORD,<br />
P_SESSION_ID =&gt; v('APP_SESSION'),<br />
P_FLOW_PAGE =&gt; :APP_ID||':'||nvl(v_start_page,1)<br />
);<br />
END;</code></p>
<h3><span style="color: #ff0000;">Changing the Login Page</span></h3>
<p>To keep all of the pages relating to certain areas together, we’ve changed the page that users use to login. We wanted all of the generic pages that every user needed to access to be numbered below 100. A login page of 101 didn’t fit with this, so we copied login page 101 (it seemed the easiest option) and created a new page 2. In <strong>Shared Components &gt; Authentication Schemes</strong> we selected<strong>Database Account</strong>, which is the option we are using. On this page, in the <strong>Page Session Management</strong> section, there is a <strong>Session Not Valid Page</strong>. We changed this value from 101 to 2. Now, when the session is not valid, APEX redirects to page 2 – our new login page. This allowed us to delete page 101, customise page 2 for our requirements and keep everything tidy.</p>
<p>&nbsp;</p>
<p>Source : apex-blog.com</p>]]></content:encoded>
			<wfw:commentRss>http://www.oraclebd.com/changing-the-login-and-start-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding a Checkbox to Your Report – APEX_ITEM</title>
		<link>http://www.oraclebd.com/adding-a-checkbox-to-your-report-apex_item/</link>
		<comments>http://www.oraclebd.com/adding-a-checkbox-to-your-report-apex_item/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 09:43:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle Apex]]></category>

		<guid isPermaLink="false">http://www.oraclebd.com/?p=74</guid>
		<description><![CDATA[You want to add functionality to your report. You want to be able to tick things and have it do stuff. Luckily there’s an easy way and it’s called APEX_ITEM. This tutorial will talk you through adding a checkbox to your report and adding functionality to your page to identify records that are ticked and [...]]]></description>
			<content:encoded><![CDATA[<p>You want to add functionality to your report. You want to be able to tick things and have it do stuff. Luckily there’s an easy way and it’s called APEX_ITEM.</p>
<p>This tutorial will talk you through adding a checkbox to your report and adding functionality to your page to identify records that are ticked and processing them.</p>
<p>This tutorial assumes you have a workspace with the Sample Application installed.</p>
<p>I’ve used checkboxes in reports in a number of different scenarios in my applications but the most useful has been as part of a confirmation screen. When a user has selected to make a change that has an effect on a number of different records, like removing a task from a schedule, then a page is displayed listing all the records that will be changed. Each record has a checkbox and only those that are ticked will be updated. This allows the user to check what the application will do before it does it and to select records to exclude from the processing.</p>
<p>This tutorial will show you how to add the checkboxes and then add processing that only fires for records that are ticked. This uses the APEX_ITEM API which allows a number of different items to be added to pages in a similar way. This API has infinite uses and I recommend looking in the APEX help pages for more information.</p>
<p>In the Object Browser:</p>
<ol>
<ol>
<li>Add new column varchar2(50) called “modified_by” on the EMP table.</li>
<li>Add new before row trigger to the EMP table called “emp_btrg” with the following code:</li>
</ol>
</ol>
<p><code>IF inserting or updating THEN<br />
:NEW.modified_by := apex_application.g_user;<br />
END IF;</code></p>
<ol>
<li>Add new column varchar2(1) called “ticked” on the EMP table.</li>
</ol>
<p>In the Application Builder:</p>
<ol>
<ol>
<li>Add a new blank page to your application with a name of “Tutorial”.</li>
<li>Select the third option regarding tabs to <strong>Use an existing tabset</strong> and create a new tab within this tabset. Click <strong>Next </strong>twice, name the new tab “Tutorial”, click <strong>Next </strong>and then <strong>Finish</strong>.</li>
<li>On this page create a new <strong>SQL Report region</strong> with a title of “Tutorial”. When prompted in the wizard use the following SQL Query:</li>
</ol>
</ol>
<p><code>SELECT apex_item.checkbox(1,empno,'UNCHECKED') " ",<br />
empno,<br />
ename,<br />
modified_by,<br />
ticked<br />
FROM emp<br />
</code></p>
<ol>
<ol>
<li>Run the page and you should see that the results of the report are displayed along with a checkbox beside each row.</li>
<li>Edit the page and add a new button. This should be in the <strong>Tutorial region</strong>, in a <strong>Region Position</strong>. Give the button a name of “Submit”.</li>
<li>Click <strong>Next </strong>until prompted to enter a page to branch to. Enter the name of the page you are adding the button to then click <strong>Create Button</strong>.</li>
<li>Now click to <strong>Add Processes</strong> and select <strong>PL/SQL</strong>. Enter the name as “Submit” and ensure the point is <strong>On Submit – After Computations and Validations</strong>, before clicking <strong>Next</strong>.</li>
<li>Enter the following as the <strong>PL/SQL Page Process</strong>:</li>
</ol>
</ol>
<p><code>BEGIN<br />
FOR i in 1..APEX_APPLICATION.G_F01.COUNT LOOP<br />
UPDATE emp<br />
SET ticked = 'Y'<br />
WHERE empno = APEX_APPLICATION.G_F01(i);<br />
END LOOP;<br />
COMMIT;<br />
END;</code></p>
<ol>
<li>Then click <strong>Create Process.</strong></li>
</ol>
<p>Now run your page. If you tick a number of records and click <strong>Submit </strong>you’ll see that the <strong>Modified By</strong> and <strong>Ticked</strong> columns are updated for these records only.</p>
<p>Let’s look a bit closer at how we did this. The first bit of important code is:</p>
<p><code>apex_item.checkbox(1,empno,'UNCHECKED')</code></p>
<p>The first parameter is the id that is later used when calling APEX_APPLICATION. Had this been 12 then the second piece of code in the process would have referred to APEX_APPLICATION.G_F12 instead of G_F01. The second parameter is the value that we want to give the checkbox and the third parameter is the default status of the checkbox. Had we wanted all the checkboxes to be ticked by default this parameter would be “CHECKED”.</p>
<p>The second piece of important code is the references to APEX_APPLICATION:</p>
<p><code>FOR i in 1..APEX_APPLICATION.G_F01.COUNT LOOP</code></p>
<p>Here we are looping round all the records in the array that relate to the checkbox. APEX_APPLICATION stores the value of any checked checkboxes in an array with the id used by the checkbox. This allows us to then issue the UPDATE statement referencing the value in APEX_APPLICATION.G_F01 as earlier we told APEX_ITEM that this value should be the empno.</p>
<p>Hopefully this tutorial has given you an overview of how APEX_ITEM along with APEX_APPLICATION can be used to create sophisticated pages in Oracle Application Express.</p>
<p>&nbsp;</p>
<p>Source : apex-blog.com</p>
<p>&nbsp;</p>]]></content:encoded>
			<wfw:commentRss>http://www.oraclebd.com/adding-a-checkbox-to-your-report-apex_item/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamic Report Regions</title>
		<link>http://www.oraclebd.com/dynamic-report-regions/</link>
		<comments>http://www.oraclebd.com/dynamic-report-regions/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 06:35:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle Apex]]></category>

		<guid isPermaLink="false">http://www.oraclebd.com/?p=72</guid>
		<description><![CDATA[Sometimes requirements are such that you can’t write a simple SELECT statement to return the information you want to see on a page. For example, you might want a report that displays dates in the first column, names across the top and the task each person is performing on that date as the content of [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes requirements are such that you can’t write a simple SELECT statement to return the information you want to see on a page. For example, you might want a report that displays dates in the first column, names across the top and the task each person is performing on that date as the content of the report. I’ve written a scheduling application that requires a report exactly like this, however, I don’t know the date range or the people that the end user is going to want to see information for.</p>
<p>In another case we have a number of tables that all have the same structure. These are code tables that are used for Select Lists throughout our Forms and APEX applications. These tables all have the same four columns: identifier, code, meaning and an in use flag. There are hundreds of these tables so I don’t want to have to write a separate page to see the data in each of these tables. Not only would this take a considerable amount of time, but I’m likely to go crazy with boredom half way through! Luckily there is an easy solution to both these problems: Dynamic Report Regions.</p>
<p>In this tutorial we’ll use two tables with the same columns and discover how easy it is to create a report region that queries the table name in an item on the page. Before we start you’ll need to create two tables using the following create table statements:</p>
<p><code>CREATE TABLE SOFTWARE<br />
( ID NUMBER,<br />
SHORT_NAME VARCHAR2(100),<br />
DESCRIPTION VARCHAR2(1000),<br />
IN_USE VARCHAR2(1),<br />
CONSTRAINT "SOFTWARE_PK" PRIMARY KEY (ID) ENABLE<br />
)<br />
/<br />
CREATE TABLE ROOMS<br />
( ID NUMBER,<br />
SHORT_NAME VARCHAR2(100),<br />
DESCRIPTION VARCHAR2(1000),<br />
IN_USE VARCHAR2(1),<br />
CONSTRAINT "ROOMS_PK" PRIMARY KEY (ID) ENABLE<br />
)<br />
/</code></p>
<p>Now we can insert some data into these tables so that the reports have something to return. Make sure the data is noticably different. Or use these insert statements:<br />
<code><br />
INSERT INTO software (id, short_name, description, in_use) VALUES ('1', 'Oracle', 'Oracle 9iR2', 'N');<br />
INSERT INTO software (id, short_name, description, in_use) VALUES ('2', 'Oracle DB', 'Oracle 10g', 'Y');<br />
INSERT INTO software (id, short_name, description, in_use) VALUES ('3', 'Access', 'Microsoft Access', 'Y');<br />
INSERT INTO software (id, short_name, description, in_use) VALUES ('4', 'Windows', 'MS Windows XP', 'Y');<br />
INSERT INTO rooms (id, short_name, description, in_use) VALUES ('1', 'Lounge', 'The main living room', 'Y');<br />
INSERT INTO rooms (id, short_name, description, in_use) VALUES ('2', 'Bed 1', 'The Master bedroom', 'Y');<br />
INSERT INTO rooms (id, short_name, description, in_use) VALUES ('3', 'En-suite', 'The en-suite bathroom to the master bedroom', 'Y');<br />
INSERT INTO rooms (id, short_name, description, in_use) VALUES ('4', 'Study', 'The home office', 'Y');</code></p>
<p>In the Application Builder:</p>
<ol>
<ol>
<li>Create a new blank page within your application.</li>
<li>On this page add a new <strong>Report Region</strong>, select <strong>SQL Report</strong> and set the<strong>Title </strong>to “Table Data” and click <strong>Next.</strong></li>
<li>In the section for the <strong>SQL Query</strong>, enter the following:</li>
</ol>
</ol>
<p><code>DECLARE<br />
v_query varchar2(1000);<br />
BEGIN<br />
IF :P2_TABLE_NAME is not null THEN<br />
v_query := 'SELECT id, short_name, description, in_use FROM '||<br />
:P2_TABLE_NAME;<br />
ELSE<br />
v_query := 'SELECT 1 FROM dual WHERE 1=0';<br />
END IF;<br />
return(v_query);<br />
END;</code></p>
<ol>
<li>Ensure the <strong>Generic Columns</strong> radio is selected and click <strong>Create Region</strong>to create this region.</li>
<li>Create a new <strong>Text Item</strong> in the <strong>Report Region</strong> callled “Pn_TABLE_NAME” where <strong>n</strong> is your page number.</li>
<li>Create a new unconditional branch on the page, branching to your page so that when the page is submitted you are not taken to a different page.</li>
<li>Finally, create a button on your page without its own branch.</li>
</ol>
<p>Run the page and enter “rooms” in the text field and click the button. The page will refresh showing the data from the <strong>ROOMS </strong>table. Now enter “software” in the text field and click the button; the data from the <strong>SOFTWARE </strong>table is displayed.</p>
<p>This functionality can be built upon in many ways. You could change the <strong>Text Item</strong> to be a <strong>Select List</strong> of tables from <strong>all_tables</strong> and build the select statement from the information in <strong>all_tab_columns</strong> using the code below:</p>
<pre><code>DECLARE v_query varchar2(1000); cursor c_columns is SELECT column_name FROM all_tab_columns WHERE table_name = upper(:P3_TABLE_NAME); BEGIN IF :P3_TABLE_NAME is not null THEN FOR a IN c_columns LOOP IF v_query is null THEN v_query := 'SELECT '||a.column_name; ELSE v_query := v_query||', '||a.column_name; END IF; END LOOP; v_query := v_query||' FROM '||:P3_TABLE_NAME; ELSE v_query := 'SELECT 1 FROM dual WHERE 1=0'; END IF; return(v_query); END;</code></pre>
<p>Building a select statement with a function opens up various opportunities in APEX for you to build a dynamic application that is not only easier to use but also saves a great deal of development time.</p>
<p><em><strong>Source : apex-blog.com</strong></em><!--EndFragment--></p>]]></content:encoded>
			<wfw:commentRss>http://www.oraclebd.com/dynamic-report-regions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamic HTML Generated From PL/SQL Tutorial</title>
		<link>http://www.oraclebd.com/dynamic-html-generated-from-plsql-tutorial/</link>
		<comments>http://www.oraclebd.com/dynamic-html-generated-from-plsql-tutorial/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 06:20:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle Apex]]></category>

		<guid isPermaLink="false">http://www.oraclebd.com/?p=70</guid>
		<description><![CDATA[Using APEX it’s very easy to display information using forms and reports regions, you could even throw in a chart or dial for a bit of something different. However, it’s also simple to generate HTML pages from PL/SQL code. This opens up a world of choice when it comes to designing and developing your application. [...]]]></description>
			<content:encoded><![CDATA[<p>Using APEX it’s very easy to display information using forms and reports regions, you could even throw in a chart or dial for a bit of something different. However, it’s also simple to generate HTML pages from PL/SQL code. This opens up a world of choice when it comes to designing and developing your application.</p>
<p>This tutorial is a simple demonstration of creating HTML output from PL/SQL code. It assumes that you have completed the <a href="http://www.apex-blog.com/oracle-apex/adding-a-checkbox-to-your-report-apex_item-tutorial-30.html">APEX_ITEM Tutorial</a> as it relies on the checkbox and ticked column that you create within this tutorial.</p>
<p>In the APEX_ITEM Tutorial we add a new column to the EMP table called ticked and then added a checkbox to a report to update this column when the checkbox was checked. Now we’ll add a new region to the same page which outputs the employee details, showing those that have been ticked in bold.</p>
<p>In the Application Builder:</p>
<ol>
<ol>
<li>Navigate to the page that you previously used for the APEX_ITEM Tutorial. On this page add a new HTML region. In the wizard accept the default options, except set the name to “PL/SQL Output” and the column to 2, then click the <strong>Create Region</strong> button.</li>
<li>Now edit the region that you’ve just created.</li>
<li>Set the Type to be “PL/SQL (anonymous block)”</li>
<li>Set the Region Source to :</li>
</ol>
</ol>
<pre><code>DECLARE </code><code>CURSOR c_emp IS </code><code>SELECT empno, ename, ticked FROM emp;</code><code> BEGIN FOR a IN c_emp LOOP IF a.ticked = 'Y' THEN</code><code> htp.p('&lt;b&gt;Employee '||a.ename||' ('||a.empno||') has been ticked. &lt;/b&gt;&lt;br/&gt;');</code><code> ELSE htp.p('Employee '||a.ename||' ('||a.empno||') has NOT been ticked. &lt;br/&gt;');</code><code>END IF;</code><code> END LOOP;</code><code> END;</code></pre>
<ol>
<li>Run the page.</li>
</ol>
<p>Running the page should display a list of all the employees in the table. Those that have been ticked will be displayed in bold and those that haven’t will be normal. The HTML that is generated on the page is controlled by the htp.p call. There are numerous tags that can be used with the htp function, these are explained in detail in the <a href="http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/w_htp.htm">Oracle documentation</a>. I have used htp.p which just generates the HTML without any surrounding tags. I find that this gives me the most flexibility, especially if I need to come back and make changes.</p>
<p>In this example the PL/SQL generated region is ultimately redundant. It’s not giving us any more information than the reports region next to it. However, this is the easiest example I could think of. PL/SQL generated regions are much more powerful. For example, it can be used to generate a summary page pulling on information from different tables and using functions or calculations in PL/SQL. Or to generate a report style page to replace Oracle Reports style output. I’m sure you’ll agree the possibilities are endless.</p>
<p>Source : <a href="http://www.apex-blog.com/">http://www.apex-blog.com</a><!--EndFragment--></p>]]></content:encoded>
			<wfw:commentRss>http://www.oraclebd.com/dynamic-html-generated-from-plsql-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle Ref Cursor And Cursor Variable</title>
		<link>http://www.oraclebd.com/oracle-ref-cursor-and-cursor-variable/</link>
		<comments>http://www.oraclebd.com/oracle-ref-cursor-and-cursor-variable/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 05:56:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.oraclebd.com/?p=66</guid>
		<description><![CDATA[HTML clipboardMany of you may have heard of the terms REF CURSOR and cursor variable. This article here will explain you clearly – what is a ref cursor and cursor variable. Then it will demonstrate you how to use a ref cursor and cursor variables with example. &#160; A REF CURSOR is a cursor which [...]]]></description>
			<content:encoded><![CDATA[<p>HTML clipboardMany of you may have heard of the terms REF CURSOR and cursor variable. This article here will explain you clearly – what is a ref cursor and cursor variable. Then it will demonstrate you how to use a ref cursor and cursor variables with example.</p>
<p>&nbsp;</p>
<p>A REF CURSOR is a cursor which does not have a fixed SQL query associated with it. Basically you declare a TYPE of REF CURSOR type. Then you define a variable of that TYPE. That variable is called and cursor variable.</p>
<p>Then you assign a query to that cursor variable. After that you can use that cursor variable like any other cursor.</p>
<p>CURSOR VARIABLE is a variable whose data type is a TYPE of REF CURSOR.</p>
<p>On the other hand, in a normal cursor you write a select query and you give a name to that select query. You can open, fetch data and close that cursor whenever you want.</p>
<p>For example, you declare a normal cursor as:</p>
<p><strong><big><em>cursor emp_cur is<br />
select * from emp where deptno =10;</em></big></strong></p>
<p>In this example you are giving a name “emp_cur” to the SQL query. The sql query is always static. It will always return you all the employees who are in department id 10. Now you can use open-fetch-close on this cursor as many times as you want in your pl/sql program.</p>
<p>Coming back to REF CURSOR, you can define a REF CURSOR TYPE as</p>
<p><em><strong>TYPE RefCurTyp IS REF CURSOR;</strong></em></p>
<p>Here RefCurTyp is a user defined datatype of REF CURSOR. Now any variable that you declare of datatype RefCurTyp will be a cursor variable.</p>
<p>For example here ref_cv is a cursor variable:</p>
<p><strong><em><big>ref_cv RefCurTyp;</big></em></strong></p>
<p>In the example below the package has two stored procedures. One of the procedure will accept a number as input parameter. Based on that number the other procedure will OPEN a REF cursor and return data to the calling procedure. Then the calling procedure can process the ref cursor as any other normal static query cursor. Using two separate stored procedure makes it clearer to understand and easier for future modifications.</p>
<p><em><strong>CREATE OR REPLACE PACKAGE pkg_ref_cursor_test IS<br />
TYPE RefCurTyp IS REF CURSOR;<br />
PROCEDURE p_process_data(in_indi number);<br />
PROCEDURE p_open_refcur (ref_cv IN OUT RefCurTyp, in_indi number);<br />
END pkg_ref_cursor_test;<br />
/</strong></em></p>
<p><em><strong>CREATE OR REPLACE PACKAGE BODY pkg_ref_cursor_test IS</strong></em></p>
<p><em><strong>PROCEDURE p_process_data(in_indi number) IS<br />
ref_cv RefCurTyp;<br />
l_count number;<br />
BEGIN<br />
p_open_refcur(ref_cv, in_indi);<br />
LOOP<br />
FETCH ref_cv INTO l_count;<br />
EXIT WHEN ref_cv%NOTFOUND;<br />
IF in_indi = 10 THEN<br />
dbms_output.put_line(‘Total emp=’||l_count);<br />
ELSIF in_indi =20 THEN<br />
dbms_output.put_line(‘Total dept=’||l_count);<br />
END IF;<br />
END LOOP;<br />
CLOSE ref_cv;<br />
EXCEPTION<br />
WHEN OTHERS THEN<br />
dbms_output.put_line(‘Error = ‘||SQLERRM);<br />
END;</strong></em></p>
<p><strong><em>PROCEDURE p_open_refcur (ref_cv IN OUT RefCurTyp, in_indi number) IS<br />
BEGIN<br />
IF in_indi = 10 THEN<br />
open ref_cv FOR SELECT COUNT(*) FROM emp;<br />
ELSIF in_indi =20 THEN<br />
open ref_cv FOR SELECT COUNT(*) FROM dept;<br />
END IF;<br />
END;<br />
END pkg_ref_cursor_test;<br />
/</em></strong></p>
<p>As you can see from the above example, the cursor variable ref_cv is associated either with emp table or with dept table. So the SQL query for this cursor is not static – not declared when the cursor<br />
is declared. The cursor returns either number of employee or number of departments based on the input parameter</p>
<p>Also note the exception section in p_process_data stored procedure. When a cursor can not be opened (a number other than 10 or 20 is passed) then the program will encounter this error. So handling exception here should trap that as this stored program will try to fetch from the cursor even the cursor was not opened at all.</p>
<p><strong><em> Source : Oracle city </em></strong></p>]]></content:encoded>
			<wfw:commentRss>http://www.oraclebd.com/oracle-ref-cursor-and-cursor-variable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.NET DEVELOPMENT  WITH ODAC 11.2 RELEASE 4</title>
		<link>http://www.oraclebd.com/net-development-with-odac-11-2-release-4/</link>
		<comments>http://www.oraclebd.com/net-development-with-odac-11-2-release-4/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 04:57:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.oraclebd.com/?p=61</guid>
		<description><![CDATA[More Details]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.oracle.com/technetwork/topics/dotnet/tech-info/odac-112-r4-ds-1444666.pdf">More Details</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.oraclebd.com/net-development-with-odac-11-2-release-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ODAC 11.2 Release 4 Production Released with Entity Framework and LINQ Support</title>
		<link>http://www.oraclebd.com/odac-11-2-release-4-production-released-with-entity-framework-and-linq-support/</link>
		<comments>http://www.oraclebd.com/odac-11-2-release-4-production-released-with-entity-framework-and-linq-support/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 02:46:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.oraclebd.com/?p=58</guid>
		<description><![CDATA[ODAC 11.2 Release 4 (11.2.0.3) has arrived for Entity Framework and LINQ developers! It includes 32-bit and x64 versions with the option of using an automated installer or xcopy deployment. The release incorporates Oracle Database client 11.2.0.3, which can access Oracle Database 9.2 and higher. Oracle supports Entity Framework and LINQ with Microsoft Visual Studio [...]]]></description>
			<content:encoded><![CDATA[<p>ODAC 11.2 Release 4 (11.2.0.3) has arrived for Entity Framework and LINQ developers! It includes 32-bit and x64 versions with the option of using an automated installer or xcopy deployment.</p>
<p>The release incorporates Oracle Database client 11.2.0.3, which can access Oracle Database 9.2 and higher. Oracle supports Entity Framework and LINQ with Microsoft Visual Studio 2010 and .NET Framework 4, including Entity Framework 4.1 and 4.2. Code First is not supported in this release.</p>
<p>&nbsp;</p>
<p><a href="http://www.oracle.com/technetwork/topics/dotnet/whatsnew/index.html">More</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.oraclebd.com/odac-11-2-release-4-production-released-with-entity-framework-and-linq-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle .NET Developer Center</title>
		<link>http://www.oraclebd.com/oracle-net-developer-center/</link>
		<comments>http://www.oraclebd.com/oracle-net-developer-center/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 02:44:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.oraclebd.com/?p=56</guid>
		<description><![CDATA[Oracle&#8217;s .NET development community numbers over 800,000 members. With Oracle&#8217;s extensive support, Visual Studio developers can take full advantage of database and application server technologies, such as performance self-tuning, Real Application Clusters, messaging, and simplified management of advanced data types, such as XML, SecureFiles, and user-defined types. At the OTN .NET Developer Center, both beginner [...]]]></description>
			<content:encoded><![CDATA[<p>Oracle&#8217;s .NET development community numbers over 800,000 members. With Oracle&#8217;s extensive support, Visual Studio developers can take full advantage of database and application server technologies, such as performance self-tuning, Real Application Clusters, messaging, and simplified management of advanced data types, such as XML, SecureFiles, and user-defined types. At the OTN .NET Developer Center, both beginner and advanced .NET programmers can enhance their Oracle skills through step-by-step tutorials, technical articles, white papers, and videos.</p>
<p><a title="More Details" href="http://www.oracle.com/technetwork/topics/dotnet/whatsnew/index.html">Click </a></p>
<p>&nbsp;</p>]]></content:encoded>
			<wfw:commentRss>http://www.oraclebd.com/oracle-net-developer-center/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

