Showing posts with label how to create form in d2k. Show all posts
Showing posts with label how to create form in d2k. Show all posts

Wednesday, March 9, 2011

ORACLE DML DDL DCL TCL


ORACLE DML Statement (Data manipulation language)
1.       Delete
·         Delete all records from a table , the space for the record remain.
2.       Insert
·         Insert data in a table.
3.       Marge
·         Upsets operation (insert & update).
4.       Select
·         Retrieve data from a table
5.       Update
·         Update existing data within a table.
6.       Call
·         Call a PL/SQL or Java program.
7.       Lock table  
·         Control concurrency.


DCL (Data Control Language)

1.       Grant
·         Gives user access privileges to database.
2.       Revoke
·         Withdraw access privileges given with the grant command.


TCL(Transaction Control)

1.       Commit
·         Save work done.
2.       Save point
·         Indentify a point in a transition to which you can latter rollback.
3.       Rollback
·         Restore database to original since the last commit.
4.       Set transition
·         Change transition option like  isolation level and what rollback segment to use.


DDL(Data Definition language)

1.       Create
·         To create object in the database.
2.       Alter
·         Alter the structure of the database.
3.       Drop
·         Delete object of the database.
4.       Truncate
·         Remove the record from a table, including all spaces allocated for the record are removed.
5.       Commit
·         Add commends to the data dictionary.
6.       Rename
·         Rename an object.

Welcome your suggestion

Saturday, March 5, 2011

LOAD IMAGE THROUGH FORM

Create Table as :
CREATE TABLE IMAGE
(  E_CODE     NUMBER,
  E_NAME VARCHAR2(40),
  E_PICTURE  LONG RAW)
























As above picture 
Trigger : When_button_pressed
declare
   dirname     varchar2(255);
   v_filename  varchar2(255);
begin
   tool_env.getvar('IMAGE', dirname);
   dirname := dirname || '\photo';
   v_filename := get_file_name(dirname,NULL,
   'All Files (*.*)|*.*|'               ||
   'JPEG Files (*.jpg)|*.jpg|'          ||
   'Bitmap Files (*.bmp)|*.bmp|'        ||
   'TIFF Files (*.tif)|*.tif|'          ||
   'CompuServe Files (*.gif)|*.gif|'    ||
   'PC Paintbrush Files (*.pcx)|*.pcx|' );
   if v_filename is not null then
           read_image_file(v_filename,'ANY','ABC.E_PICTURE');
   end if;
end;