Oracle Questions And Answer Page 2
 

Oracle Questions And Answer Page 1

SQL*PLUS QUESTIONS

ORACLE  FORMS TEST PAPER 

ORACLE QUESTIONS And ANSWERs Page 1

Oracle Questions And Answer Page 2

Oracle Questions And Answer Page 3

Reports  Questions And Answers

Oracle Assignments

Oracle Faqs

Oracle Questions & Answers



What are the different modules of FORMS 4.5 ?

Form, Menu andLibrary modules.

What are the differences between FORMS 3.0 and FORMS 4.5 ?

FORMS 3.0FORMS 4.5

1] ModeCharacterGUI

2] System Variables2042

3] SessionSingleMultiple

4] Blocks, Canvas255No limit

5] Triggers75121

6] Items types-10

7] RelationDesign TimeRun Time

( Using SET_RELATION_PROPERTY )

8] InheritanceNot AvailableAvailable

9] Property Class- DO -- DO -

10] Object Groups- DO -- DO -

11] Library- DO -- DO -

12] Attached Libraries- DO -- DO -

13] Visual Attributes- DO -- DO -

What is the maximum limit for creating BLOCKS and CANVAS in FORMS 4.5 ?

NO LIMIT

In a MULTI RECORD BLOCK can we have an item displayed once ?

Yes, By setting the ITEMS DISPLAYED property for the respective item in the Properties Window.

After creation of the block can we create a BUTTON PALETTE ?

No.

What are the different types of triggers that will be created for MASTER DELETESproperties such as a] ISOLATED, b] NON - ISOLATED, c] CASCADING ?

Master Deletes PropertyResulting Triggers

NON - ISOLATEDOn-Check-Delete-Master

On-Clear-Details

On-Populate-Details

CASCADINGOn-Clear-Details

On-Populate-Details

Pre-Delete

ISOLATEDOn-Clear-Details

On-Populate-Details

What is the difference between creating a MASTER-DETAIL relationship in NEW BLOCK window and creating relations after creation of the blocks ?

When you create the relation in the NEW BLOCK window, Oracle forms also alters the properties of the FOREIGN KEY items(s) in the DETAIL BLOCK by doing the following:

·Setting the CANVAS property to NULL to make the item a NULL CANVAS item.

·Setting the following properties to FALSE

DISPLAYED, ENABLED, NAVIGABLE, QUERY ALLOWED AND UPDATE ALLOWED.

·Sequencing items in the Navigator such that the FOREIGN KEYITEMS are last in the block’s navigation sequence.

·Boiler plate text label for the FOREIGN KEY ITEM is not created.

How to set RELATION properties Dynamically ?

Using the following properties:

Syntax:

SET_RELATION_PROPERTY(relation_id, property, value);

SET_RELATION_PROPERTY(relation_name, property, value);

How many types of ITEMS are there in FORMS 4.5 ?

10 items ( Text Item, Display Item, List Item, Image Item, Chart Item, VBX, OLE, Check Box, Radio Button, Push Button ).

What are the different types of LIST ITEMS and the triggers associated with them ?

1] Pop list, 2] Text list, 3] Combo box.

Triggers:

1] When-List-Activated

2] When-List-Changed

Can we change the color of the PUSH BUTTON ?

No.

Note: When we make the ICONIC property of the PUSH BUTTON as TRUE, then we can change the Color of the button. But adding text to the button is not possible.

What is the significance of the OTHER VALUES property in CHECK BOX ?

You can specify that a CHECK BOX can handle the OTHER VALUES property in one of the following ways:

·Reject Other Values as NOT ALLOWED.

·Display Other Values as the CHECKED STATE

·Display Other Values as UNCHECKED STATE

What is a RADIO GROUP ? Is dummy radio group necessary ? What is the associated trigger ? How to DISABLE a radio button dynamically ?

A RADIO GROUP is an interface control that displays a fixed number of options that are MUTUALLY EXCLUSIVE. Each option is represented by an individual radio button.

Yes. When-Radio-Changed Trigger.

Use Set_Radio_Button_Property to DISABLE a radio button.

What is the difference between TEXT ITEM& DISPLAY ITEM ?

TEXT ITEMDISPLAY ITEM

NavigableTRUEFALSE

MemoryMoreLess

What is the differnce between SINGLE LINE TEXT ITEM and MULTILINE TEXT ITEM ?

SINLE LINE TEXT ITEMMULTIILINE TEXT ITEM

Scroll BarNOYES

Wrap StyleNOYES

SecureYESNO

Auto SkipYESNO

Format MaskYESNO

How to invoke LOV dynamically ?

Using SHOW_LOV built-in

Syntax:

SHOW_LOV(lov_id);

SHOW_LOV(lov_id, x, y);

SHOW_LOV(lov_name);

SHOW_LOV(lov_name, x, y);

What does LOV FOR VALIDATION property do when it is set to TRUE ?

When LOV for Validation is True, Oracle Forms compares the current value of the text item to the values in the first column displayed in the LOV whenever the validation event occurs:

·If the value in the text item matches one of the values in the first column of the LOV, validation succeeds, the LOV is not displayed, and processing continues normally.

·If the value in the text item does not match one of the values in the first column of the LOV, Oracle Forms displays the LOV and uses the text item value as the search criteria to

automatically reduce the list.

What is the difference between LIST_VALUES and SHOW_LOV ?

LIST_VALUES:

LIST_VALUES displays the list of values for the current item, as long as the input focus is in a text item

that has an attached LOV.The list of values remains displayed until the operator dismisses the LOV or

selects a value.

By default, LIST_VALUES uses the NO_RESTRICT parameter.This parameter causes Oracle Forms

not to use the automatic search and complete feature.If you use the RESTRICT parameter, Oracle

Forms uses the automatic search and complete feature.

SHOW_LOV:

Displays a list of values (LOV) window at the given coordinates, and returns TRUE if the operator selects a value from the list, and FALSE if the operator Cancels and dismisses the list.

Note: You must attach a LIST_VALUES built-in to the text item. But it is not necessary to attach SHOW_LOV to the text item.

What is a RECORD GROUP ? Different types of record groups ? How to create QUERY RECORD GROUP Dynamically ?

A RECORD GROUP is an Internal Oracle Forms data structure that has a column/row frame work similar to a database table.TYPES:QUERY,NON-QUERY AND STATIC RECORD GROUP.

For creating QUERY RECORD GROUPdynamically use CREATE_GROUP_FROM_QUERY(recordgroup_name, query);

How many no. of columns that a RECORD GROUPcan have ?

The total no. of columns should not exceed 64K.

What does POPULATE_GROUP return when query suceeds ?

NUMBER i.e 0When it suceeds.

How to change an LOV from one record group to another record group ?

Use SET_LOV_PROPERTY.

Syntax:

SET_LOV_PROPERTY(lov_id, property, value);

SET_LOV_PROPERTY(lov_name, property, value);

SET_LOV_PROPERTY(lov_id, property, x, y);

SET_LOV_PROPERTY(lov_name, property, x, y);

Ex : Set_LOV_Property(lov_id,GROUP_NAME,'NEW_GROUP_NAME');

What are different types of CANVASES ?

1] CONTENT, 2] STACKED, 3] HORIZONTAL TOOL BAR and 4] VERTICAL TOOL BAR.

Explain RAISE ON ENTRY PROPERTY ?

The Raise on Entry property of canvas-views determines how stacking order is affected by navigation to items on those views:

·When Raise on Entry is False, Oracle Forms raises the canvas-view only if the target item is hidden behind another canvas-view in that same window.

·When Raise on Entry is True, Oracle Forms raises the canvas-view to the front of the window whenever the operator or the application navigates to an item on that view. Be careful about

setting Raise on Entry to True for a content canvas-view; Because a content view occupies the

entire content area of its window, it will always obscure any stacked canvas-views when it is

raised to the front of the view stack.

What is a CONTENT VIEW?

A CONTENT CANVAS VIEW is the “BASE” view that occupies the entire CONTENT pane of the window on which it is placed.

What is the difference between SHOW_VIEW and REPLACE_CONTENT_VIEW ?

Use SHOW_VIEW and REPLACE_CONTENT_VIEW.

Syntax:

SHOW_VIEW(view_id); SHOW_VIEW(view_name);

Syntax:

REPLACE_CONTENT_VIEW(window_id, view_id);

REPLACE_CONTENT_VIEW(window_name, view_id);

REPLACE_CONTENT_VIEW(window_id, view_name);

REPLACE_CONTENT_VIEW(window_name, view_name);

SHOW_VIEW displays the view at the specified display co-ordinates, whereas REPLACE_CONTENT_VIEW displays the view at the location of the prevoiusly displayed content view. The advantage is REPLACE_CONTENT_VIEW will not obscureany stacked view displayed before calling REPLACE_CONTENT_VIEW.

What are the different types of WINDOWS ?

1] DOCUMENT WINDOW, 2] DIALOG WINDOW

How to display a WINDOW programmatically ?

Use SHOW_WINDOW, SET_WINDOW_PROPERTY to display window programmatically.

Syntax:

SHOW_WINDOW(window_id);

SHOW_WINDOW(window_id, x, y);

SHOW_WINDOW(window_name);

SHOW_WINDOW(window_name, x, y);

Syntax:

SET_WINDOW_PROPERTY(window_id, property, value);

SET_WINDOW_PROPERTY(window_id, property, x);

SET_WINDOW_PROPERTY(window_id, property, x, y);

SET_WINDOW_PROPERTY(window_name, property, value);

SET_WINDOW_PROPERTY(window_name, property, x);

SET_WINDOW_PROPERTY(window_name, property, x, y);

To which type of window REMOVE ON EXIT property is meaningful ?

DOCUMENT WINDOW( Modeless Window)

To which type of window SCROLL BARdoesn’t apply ?

DIALOG WINDOW ( Modal Window )

How to SCROLL a window dynamically ?

Use SCROLL_VIEW, SET_VIEW_PROPERTY built-in’s.

Syntax:

SCROLL_VIEW(view_id, x, y);

SCROLL_VIEW(view_name, x, y);

Syntax:

SET_VIEW_PROPERTY(view_id, property, value);

SET_VIEW_PROPERTY(view_id, property, x, y);

SET_VIEW_PROPERTY(view_name, property, value);

SET_VIEW_PROPERTY(view_name, property, x, y);

How to RESIZE a Window ?

Use RESIZE_WINDOW , SET_WINDOW_PROPERTY Built-in

Syntax

RESIZE_WINDOW(window_id, width, height);

RESIZE_WINDOW(window_name, width, height);

Syntax:

SET_VIEW_PROPERTY(view_id, property, value);

SET_VIEW_PROPERTY(view_id, property, x, y);

SET_VIEW_PROPERTY(view_name, property, value);

SET_VIEW_PROPERTY(view_name, property, x, y);

How to increase the SIZE of the window dynamically ?

Use SET_WINDOW_PROPERTY.

Syntax:

SET_WINDOW_PROPERTY(window_id, property, value);

SET_WINDOW_PROPERTY(window_id, property, x);

SET_WINDOW_PROPERTY(window_id, property, x, y);

SET_WINDOW_PROPERTY(window_name, property, value);

SET_WINDOW_PROPERTY(window_name, property, x);

SET_WINDOW_PROPERTY(window_name, property, x, y);

What are the window event triggers ?

WHEN-WINDOW-ACTIVATED

WHEN-WINDOW-DEACTIVATED

WHEN-WINDOW-CLOSED

WHEN-WINDOW-RESIZED

What is a CONSOL WINDOW ? On what window it will be displayed ?Can we change the consol window at run time ?

A CONSOL WINDOWincludes the STATUS LINE and MESSAGE LINE and is displayed at the bottom of the window to which it is attached.

On MS-WINDOWS the CONSOL WINDOW is always displayed on the MDI application window and cannot be displayed on individual document or dialog windows in the form.

NO.

Define a] PROPERTY CLASS , b] VISUAL ATTRIBUTES ? What are the differences between property class and visual attributes ?

A PROPERTY CLASS is a named object that contains a list of properties and their settings.

A VISUAL ATTRIBUTE is a separate object that defines a set of visual attribute settings.

Property classes are similar to named visual attributes, but there are important differences you should

be aware of:

·Named visual attributes define only font, color, and pattern attributes; property classes can contain these and any other properties.

·You can change the appearance of objects at runtime by changing the named visual attribute programmatically; property class assignment cannot be changed programmatically.

·When an object is inheriting from both a property class and a named visual attribute, the named visual attribute settings take precedence, and any visual attribute properties in the class are

ignored.

How to change a VISUAL ATTRIBUTE dynamically ?
Use

·GET_ITEM_PROPERTY

·GET_RADIO_BUTTON_PROPERTY

·SET_CANVAS_PROPERTY

·SET_ITEM_PROPERTY

·SET_RADIO_BUTTON_PROPERTY

If I change a property settings of a field which is attached to a visual attribute what will happen ?

The VISUAL ATTRIBUTE name in the properties window for that item will become CUSTOM.

What is a LIBRARY ?

A library is a collection of subprograms, including user-named procedures, functions and packages.

Libraries provide a convenient means of storing client-side program units and sharing them among

multiple applications. Once you create a library, you can attach it to any other form, menu, or library module.Then, you can call library program units from triggers, menu item commands, and user-named routines you write in the modules to which you have attached the library.

The same library can be attached to multiple forms and menus.Conversely, a single form or menu can

have more than one attached library. Libraries can also be attached to other libraries.When a library attaches another library, program units in the first library can reference program units in the attached library.

Libraries support dynamic loading --that is, a library's program units are loaded into an application only

when needed.This can significantly reduce the runtime memory requirements of an application.

What is the difference between PROGRAM UNITSand ATTACHED LIBRARIES ?

PROGRAM UNITS

A User-named subprogram is a named PL/SQL function or procedure that you write in a form , menu or library module.

- A user -named subprogram defined in a form module can be called only from triggers and other user-named subprograms in the same module.

- A user-named subprogram defined in the menu module can be called only from menu item commands and startup code in that menu module.

- A user-named subprogram defined in a library module can be called from any trigger or menu item command, provided that the library is attached to the form or menu module.

ATTACHED LIBRARIES

REFER TO PREVIOUS ANSWER.

What type of references can I use in ATTACHED LIBRARIES ?

Use NAME_IN sub programto refer to the values of bind variables and use COPY sub program procedure to set values for the bind variables.

Ex: NAME_IN(‘block_name.item_name’), NAME_IN(‘GLOBAL.variablel_name’),

NAME_IN(‘SYSTEM. variable _name).

COPY(‘’28876’,’block_name.item.name’), COPY(‘standard’,’GLOBAL.variable_name’)

COPY(‘’FALSE’,”SYSTEM.variable_name’)

What are the different types of MENU ?

PULL_DOWN, FULL SCREEN and BAR MENUS.

How to attach a menu to a form ?

In the forms set the MENU MODULE PROPERTY to the respective menu file name.

How to replace MENU’s DYNAMICALLY ?

Use REPLACE_MENU.

Syntax:

REPLACE_MENU;

REPLACE_MENU(menu_module_name);

REPLACE_MENU(menu_module_name, menu_type);

REPLACE_MENU(menu_module_name, menu_type,

starting_menu_name );

REPLACE_MENU(menu_module_name, menu_type,

starting_menu, group_name);

REPLACE_MENU(menu_module_name, menu_type,

starting_menu, group_name, use_file);

What are all the different types of MENU ITEMS ?

PLAIN, CHECK, RADIO,SEPERATOR and MAGIC ITEMS.

In which platform BACKROUND MENU is supported ?

CHARACTER MODE.

What are the different types of codes that we writein MENUS ?

NULL, MENU, PL/SQL, PLUS, CURRENT FORM and MACRO.

What are the way of referencing you will be using while writing the codes in menus ?

Use NAME_IN and COPY for referencing objects in menu commands.

What is an ALERT ? How to change an alert message dynamically ? What type of an window is an alert ? What are the maximum no. of characters that an alert have ?

An ALERT is a MODAL WINDOW that displays a message notifying the operator of some application condition.

Use SET_ALERT_PROPERTY to change the alert message.

Syntax:SET_ALERT_PROPERTY(alert_id/name,ALERT_MESSAGE_TEXT,’Good choice’).

ALERT is a MODAL WINDOW. Maximum no. of characters allowed in alert is 200.

What is FREEZE / UNFREEZE ?

Toggles properties window synchronization On and Off. When FREEZE is Off ( the Default ), the property list is updated to display the properties of objects you select in the Navigator and Windows. When FREEZE is On, the property list is pinned and does not get update, allowing you to compare it to other property lists.

What do you mean by COPYING and REFERENCING ?

COPYING creates a new and separate instance of the object in the target module.

REFERENCINGcreates a new object that maintains a link to the source object

When you COPY aREFERENCED object what will be the resultant object ?

COPYINGa REFERENCED object creates a new and separate instance of the referenced OBJECT.

The resultant is a REFERNCED object.

How to reuse the PL/SQL codes ?

For reusing PL/SQL codes we have to either REFERENCE or COPY the PL/SQL codes defined in the SOURCEobject.

Go for Program Units ( Procedures & Functions ) - Right Answer. ( Libraries )

How to use DDL statements in the FORMS 4.5 ?

Use FORMS_DDL( Statemnt)

StatementAny string expression up to 32K:

·a literal

·an expression or a variable representing the text of a block of dynamically created

PL/SQL code.

·a DML statement or

·a DDL statement

How many SYSTEM VARIABLES are there in FORMS 4.5 ?

42System Variables.

What does the SYSTEM_MOUSE_BUTTON_PRESSED variable do ?

SYSTEM.MOUSE_BUTTON_PRESSED indicates the number of the button that was clicked.Mouse

button support is limited to buttons 1 and 2 (left or middle) on a three button mouse.The value is always a character string.

What is the SYSTEM VARIABLE that is used to determine the CURRENT MODE ?

SYSTEM.MODE indicates whether the form is in Normal, Enter Query, or Fetch Processing mode.The value is always a character string.

What are the various categories of triggers ? Explain each in detail ?

1] Block-processing-triggers, 2] Interface-event-triggers, 3] Master-detail-triggers,4] Message-handling-triggers,5] Navigational-triggers,6] Query-time-triggers,7] Transactional-triggers,8] Validational-triggers.

What are different types of EDITORS ?

DEFAULT, USER-NAMED and SYSTEM editors.

What is the difference between EDIT_TEXTITEM andSHOW_EDITOR ?

Description:

Invokes the Runform item editor for the current text item and puts the form in Edit mode.

Syntax:

EDIT_TEXTITEM;

EDIT_TEXTITEM(x, y);

EDIT_TEXTITEM(x, y, width, height);

Restrictions:

·The input focus must be in a text item.

·The Width must be at least wide enough to display the buttons at the bottom of the editor

window.

Description:

DisplaysUSER-NAMED editor at the specified display co-ordinates.

Syntax:

SHOW_EDITOR(editor_id, message_in, message_out, result);

SHOW_EDITOR(editor_id, message_in, x, y, message_out, result);

SHOW_EDITOR(editor_name, message_in, message_out, result);

SHOW_EDITOR(editor_name, message_in, x, y, message_out, result);

The result parameter is a BOOLEANIN OUT parameter. If the operator accepts the editor, SHOW_EDITOR sets result to TRUE, and sets message_outto the current text string. If the operator cancels the editor, SHOW_EDITOR sets the result to FALSE and set the message_out to NULL.

NOTE:

When an editor is displayed at run time, Oracle forms is in EDIT MODE, and no triggers fire until the operator returns to the Normal mode by dismising the editor.

What are the triggers that are valid in ENTER_QUERY mode ?

The following triggers are valid in enter_query mode.

1] Key-*

2] On-error

3] On-message

4] When-triggers except

When-New-form-Instance

When-New-Block-Instance

When-Database-Record

When-Create-Record

When-Validate_Record

When-Remove_Record

When-Validate-Item

When-Image-Activated

What does the property called SECURE ? What will happen when it is set to true ?

Used to hide the value stored in a single-line text item by designating the item as secure. For example, a password text item can be made secure so that operator input does not echo to the screen.

What do you mean by OWNERSHIP view and VISUAL view ?

Ownership ViewIn the ownership view, all form objects are visible, and the display hierarchy

corresponds to the Oracle Forms object ownership hierarchy: form--block--item. Items and relations are owned by blocks; blocks are owned by forms; triggers can be owned by forms, blocks, or items; all

other form objects (windows, editors, record groups, etc.) are owned by forms.

Visual ViewIn the Visual view, only windows, canvas-views, and items are displayed. The Visual

view hierarchy corresponds to the hierarchy of objects in a form window: window--canvas-view--item.

Items are assigned to canvas-views; canvas-views are assigned to windows. Each window can have

multiple canvas-views, and there can be multiple items on a single canvas-view.

How to change the DEFAULT_WHERE clause and ORDER BY clause dynamically ?

Use DEFAULT_WHERE and ORDER_BY propery

SET_BLOCK_PROPERTY(block_id, property, value);

SET_BLOCK_PROPERTY(block_name, property, value);

How to modify the default NAVIGATION sequence ?

Use NEXT_NAVIGATION_BLOCK and PREVIOUS_NAVIGATION_BLOCK property.

SET_BLOCK_PROPERTY(block_id, property, value);

SET_BLOCK_PROPERTY(block_name, property, value);

If I have a PRIMARY and FOREIGN KEY in the table and If I On the CONSTRAINT option what trigger will be created ?

If it is a COMPOSITE KEY what type of trigger that will be created ?

1] KEY-DELREC [ Block Level ]

2] WHEN-VALIDATE-RECORD [ Record Level ]

If I have a PRIMARY KEY in the table and while creating a block and If I On the constraintproperty what trigger will be created ?

1] KEY-DELREC [ Block Level ]

2] WHEN-VALIDATE-ITEM [ Item Level - Dept No ]

If you are using PROCEDURESthat are created in a] LIBRARY, b] DATABASE, c] FORM level, Which will be advantageous ?

Library.

What are the properties of the ITEMSthat you can validate without writting triggers ?

Datatype, Required, Fixed Legth, Maximum Length, Range Low Value / High Value.

Explain in detail about DEBUGGER ?

What are the objects that I cannot create in the object navigator ?

Boiler Plate Graphics Objects - Text, Line, Square, Oval, Freeform etc.,

Give a live example where you can use non-query record group ?

a] When you want to dynamically sent the data from Forms to Reports.

b] When you want to validate a column to maintain Integrity Constraint at Form level. ( i.e before commit.)

What are the values that a WHERE clause can reference in LOV ?

a] Item Names, b] parameter, c] Global Variables.

What are the types of items that are always CONTROL items ?

Text Item, List Item, Image Item, Check Box, Push Button.

What are the different types of CUSTOM ITEMS and the Triggers associated with them ?

What are the differences between FORMS 3.0 & FORMS 4.5 which regards to MASTER - DETAIL relationship: Explain all the properties of MASTER - DETAIL in detail ?