Posts

How to embed a PDF document into HTML web page

Image
PDF the Portable Document Format, although created by Adobe in the early 90's is now an open standard ISO format for documents. It's a great way of converting propriety documents (excel, word etc.) into a easily viewable/exchangable format. Putting PDFs into web pages is increasing popular - you can view documents as they should appear with images and text formatted as the author intended. So.. how do you embed a pdf into a web page? The simple way is to use the  <object>  element. This assumes that the web browser has a PDF plugin - if not you can add a message to allow a direct download of the PDF instead. <object data="filename.pdf" type="application/pdf" width="100%" height="100%">   <p>Your web browser doesn't have a PDF plugin.   Instead you can <a href="filename.pdf">click here to   download the PDF file.</a></p> </object>

PL/SQL Functions

What is a Function in PL/SQL? A function is a named PL/SQL Block which is similar to a procedure. The major difference between a procedure and a function is, a function must always return a value, but a procedure may or may not return a value. The General Syntax to create a function is:  CREATE [OR REPLACE] FUNCTION function_name [parameters] RETURN return_datatype;  IS  Declaration_section  BEGIN  Execution_section Return return_variable;  EXCEPTION  exception section  Return return_variable;  END; 1)  Return Type:   The header section defines the return type of the function. The return datatype can be any of the oracle datatype like varchar, number etc. 2) The execution and exception section both should return a value which is of the datatype defined in the header section. For example, let’s create a frunction called ''employer_details_func' similar to the one created...

Exception Handling

In this section we will discuss about the following,  1) What is Exception Handling. 2) Structure of Exception Handling. 3) Types of Exception Handling.  1) What is Exception Handling? PL/SQL provides a feature to handle the Exceptions which occur in a PL/SQL Block known as exception Handling. Using Exception Handling we can test the code and avoid it from exiting abruptly. When an exception occurs a messages which explains its cause is recieved. PL/SQL Exception message consists of three parts.  1) Type of Exception 2) An Error Code 3) A message    By Handling the exceptions we can ensure a PL/SQL block does not exit abruptly.   2) Structure of Exception Handling. The General Syntax for coding the exception section    DECLARE    Declaration section  BEGIN    Exception section  EXCEPTION  WHEN ex_name1 THEN     -Error handling statem...