Sunday, August 7, 2011

Forms IQA 1

What is an SQL *FORMS? 
SQL FORMS as known previously and SQL * FORMS in version 2, is more or less like an interface to interact with the oracle database. The form is in *.fmb format and compiled into an executable (*.fmx). These forms provide a means to add GUI elements like scroll bars, menus etc and reduce the efforts of writing complex queries.
Oracle Forms is part of Oracle's Internet Developer Suite. Its earlier versions were called SQL*Forms. 
Oracle Forms is a 4GL Rapid Application Development (RAD) environment. 
A Forms Builder is used to create applications to enter, access, change, or delete data from Oracle databases. 
The Forms Runtime environment is needed to execute compiled Forms modules 

How do you control the constraints in forms?
This can be done by selecting the Use Constrain Property to ON.
You can suppress or customize error messages in Forms. This can be done by setting the message level of the system variable SYSTEM.MESSAGE_LEVEL. The other way to do this is by using the ON-ERROR / ON-MESSAGE triggers.  
When will ON-VALIDATE-FIELD trigger executed?
ON-VALIDATE-FIELD trigger is fired when an existing value is attempted to override the fields default behavior. For instance a user expects a city field to be mandatory and if on filling the form it is left blank, a validation error occurs.
ON-VALIDATE-FIELD triggers are used for field validation. It fires when the field validation status is New or changed. However, if the field status is already valid then any further change to the value in the field will not fire this trigger. 

What is the difference between system.current_field and system.cursor_field? 
system.current_field gives the name of the field while system.cursor_field gives the name of the field where the cursor is lying along with the block name.
The only difference between these two is that System.current_field gives name of the field and System.cursor_field gives name of the field with block name. 

What are dynamic reports? How will you create them? 
Following steps should be followed to build a Dynamic Report:
  • Create a temporary table first.
  • Then insert data to the temporary table using the After Form Trigger.
  • Generate the report using this temporary table in the Data Model.
  • Delete all records from the temporary table in the After Report trigger. 
Difference between Oracle Forms and Apps Forms. 
Oracle Forms
  • Oracle Forms renders applications using metadata stored in an .fmx file.
  • It runs client-side PL/SQL.
  • It is accessed using a web browser and its user interface is rendered using a JVM.
  • It uses exact positioning.
  • It provides robust field-level validation and event processing. 
  • It uses BI Beans as its integrated charting engine.
  • It supports a range of locking models with pessimistic as the default.
  • Each connected user in It maintains a synchronous connection to the Oracle database.
  • It uses synchronous connections to allow transactions to span multiple screen interactions.
  • With Oracle Forms, Application logic is processed in the Oracle DB, a mid-tier Forms Server, or in the rich client.
Apps Forms
  • It renders applications using metadata stored in an Oracle database.
  • It uses server-side PL/SQL.
  • It is also invoked from a Web browser but its user interface is HTML and JavaScript.
  • It uses HTML-relative positioning.
  • It supports declarative page-level validation and event processing. Programmatic field-level validation and event processing requires Javascript and AJAX.
  • It uses Flash Charts as its integrated charting engine.
  • Due to its asynchronous architecture, It uses an optimistic locking model.
  • It does not transparently allow transactions to span page views. It programmatically supports transactions spanning page views using collections.
  • Its users are asynchronously connected to the Oracle database.
  • With Apps Forms, PL/SQL application logic is processed within the Oracle database. Client-side logic is implemented using JavaScript. HTTP communications are facilitated using Apache and Mod/PLSQL. 
Both Oracle Forms and Apps Forms support the calling of Web Services, for example BPEL. 

What is the sequence of firing triggers in forms?
The following sequence should be used to fire triggers when a form opens:
  1. Pre-Form 
  2. Pre-Block
  3. Pre-Record
  4. Pre-Text-Item
  5. When-New-Form-Instance
  6. When-New-Block-Instance 
  7. When-New-Record-Instance
  8. When-New-Item-Instance
The following sequence should be followed when you exit from the form:
  1. post text item
  2. post record
  3. post block
  4. post form 
What is a record Group? What are different types of record group? 
A record group is an oracle forms data structure that has a column/row framework similar to a database table.
There are three types of record groups: query record groups, non-query record groups, and static record groups.
  • Query record group: A query record group is a record group that has an associated SELECT statement. Query record groups can be created and modified at design time or at runtime.
  • Non-query record group: A non-query record group is a group that does not have an associated query. Non-query record groups can be created and modified only at runtime.
  • Static record group: A static record group is not associated with a query. Static record groups can be created and modified only at design time
What are the Various Master and Detail Relation ships.
The various Master and Detail Relationship are
  • NonIsolated = The Master cannot be deleted when a child is existing
  • Isolated = The Master can be deleted when the child is existing
  • Cascading = The child gets deleted when the Master is deleted.

What are the master-detail triggers?
On-heck_delete_master
On_clear_details
On_populate_details These are automatically created when you create Master-Details block.

What are the types of Blocks in Forms?
Base Table block  - based on database table/views
Control Block  - non-database items are placed here like Calculation values,buttons,checkbox etc.

What are the Various Block Coordination Properties
The various Block Coordination Properties are
  • Immediate: Default Setting. The Detail records are shown when the Master Record are shown.
  • Deffered with Auto Query: Oracle Forms defer fetching the detail records until the operator navigates to the detail block.
  • Deffered with No Auto Query: The operator must navigate to the detail block and explicitly execute a query
Can a property clause itself be based on a property clause?
Yes

What are the different windows events activated at runtimes?
When_window_activated
When_window_closed
When_window_deactivated
When_window_resized
Within this triggers, you can examine the built in system variable system. event_window to determine the name of the window for which the trigger fired.

What are trigger associated with image items?
When-image-activated fires when the operators double clicks on an image itemwhen-image-pressed fires when an operator clicks or double clicks on an image item

What is trigger associated with the timer?
When-timer-expired

What is the difference between CALL_FORM, NEW_FORM and OPEN_FORM?
  • CALL_FORM: start a new form and pass control to it. The parent form will be suspended until the called form is terminated.
  • NEW_FORM: terminate the current form and replace it with the indicated new form. The old form's resources (like cursors and locks) will be released.
  • OPEN_FORM: Opens the indicated new form without suspending or replacing the parent form.
When a form is invoked with call_form, does oracle forms issues a save point?
Yes

What is new_form built-in?
When one form invokes another form by executing new_form oracle form exits the first form and releases its memory before loading the new form calling new form completely replace the first with the second. If there are changes pending in the first form, the operator will be prompted to save them before the new form is loaded.

What are visual attributes?
Visual attributes are the font, color, pattern proprieties that you set for form and menu objects that appear in your application interface.

Can one issue DDL statements from Forms?
DDL (Data Definition Language) commands like CREATE, DROP and ALTER are not directly supported from Forms because your Forms are not supposed to manipulate the database structure.
A statement like CREATE TABLE X (A DATE); will result in error:
Encountered the symbol "CREATE" which is a reserved word.
However, you can use the FORMS_DDL built-in to execute DDL statements. Eg:
FORMS_DDL('CREATE TABLE X (A DATE)');

Can one execute dynamic SQL from Forms?
Yes, use the FORMS_DDL built-in or call the DBMS_SQL database package from Forms. Eg:
FORMS_DDL('INSERT INTO X VALUES (' || col_list || ')');
Just note that FORMS_DDL will force an implicit COMMIT and may de-synchronize the Oracle Forms COMMIT mechanism.

What is the difference between the following statements?
Form A:   Insert into emp(ename) values ('MK Maran');
Form B:   FORMS_DDL('insert into emp(ename) values('||''MK Maran')');
User have to commit the form manually for Form A
Once the Form B statement executes, it will be implicitly committed.

What are the vbx controls?
Vbx control provide a simple method of building and enhancing user interfaces. The controls can use to obtain user inputs and display program outputs.vbx control where originally develop as extensions for the ms visual basic environments and include such items as sliders, rides and knobs.

What is the "LOV of Validation" Property of an item? What is the use of it?
When LOV for Validation is set to 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.

How do you use the same lov for 2 columns
We can use the same lov for 2 columns by passing the return values in global values and using the global values in the code

What are the difference between lov & list item?
Lov is a property where as list item is an item. A list item can have only one column, lov can have one or more columns

What is the difference between static and dynamic lov
The static lov contains the predetermined values while the dynamic lov contains values that come at run time

What are the different types of Record Groups?
Query Record Groups
NonQuery Record Groups
State Record Groups

What are the different display styles of list items?
Text_list
Pop_list
Combo box

Can on bypass the Oracle login screen?
The first thing that the user sees when using runform is the Oracle logon prompt asking them for their username, password, and database to connect to. You can bypass this screen or customise it by displaying your own logon screen.
Eg:
ON-LOGIN  Form-Level Trigger
declare
uname varchar2(10);
pass varchar2(10);
con_string varchar2(30);
begin
uname := 'scott';
pass :='tiger';
con_string='orcl';

logon(uname, pass||'@'||con_string);
end;

What are parameters?
Parameters provide a simple mechanism for defining and setting the valuesof inputs that are required by a form at startup. Form parameters are variables of type char,number,date that you define at design time.

What are difference between post database commit and post-form commit?
Post-form commit fires once during the post and commit transactions process, after the database commit occurs. The post-form-commit trigger fires after inserts, updates and deletes have been posted to the database but before the transactions have been finalized in the issuing the command. The post-database-commit trigger fires after oracle forms issues the commit to finalized transactions.

Can one Maximize/ Minimize a Window in Forms?
On MS-Windows, Forms run inside a Windows Multiple-Document Interface (MDI) window. You can use SET_WINDOW_PROPERTY on the window called FORMS_MDI_WINDOW to resize this MDI (or any other named) window. Examples:
set_window_property(FORMS_MDI_WINDOW, WINDOW_STATE, MINIMIZE);
set_window_property(FORMS_MDI_WINDOW, POSITION, 7, 15);
set_window_property('my_window_name', WINDOW_STATE, MAXIMIZE);

What are the different modals of windows?
Modalless windows
Modal windows

What are modal windows?
Modal windows are usually used as dialogs, and have restricted functionality compared to modeless windows. On some platforms for example operators cannot resize, scroll or iconify a modal window.

Can one issue DDL statements from Forms?
DDL (Data Definition Language) commands like CREATE, DROP and ALTER are not directly supported from Forms because your Form is not suppose to manipulate the database structure.
A statement like CREATE TABLE X (A DATE); will result in error:
Encountered the symbol "CREATE" which is an reserved word.
However, you can use the FORMS_DDL built-in to execute DLL statements
Eg: FORMS_DDL('CREATE TABLE X (A DATE)');

Can one execute dynamic SQL from Forms?
Yes, use the FORMS_DDL built-in or call the DBMS_SQL database package from Forms.
Eg: FORMS_DDL('INSERT INTO X VALUES ('||col_list||')');

Forms won't allow me to use restricted built-in's. What should I do?
How to get around the "can't use a restricted built-in in built-in XXX" message:
1.     Create a TIMER at the point where you want the navigation to occur. Eg.create_timer('TIMER_X', 5, NO_REPEAT);
2.     Code a WHEN-TIMER-EXPIRED trigger to handle the navigation
DECLARE
tm_name VARCHAR2(20);
BEGIN
tm_name := Get_Application_Property(TIMER_NAME);
IF tm_name = 'TIMER_X' THEN
Go_Item('ITEM_X');
END IF;
END;

Can one change the mouse pointer in Forms?
The SET_APPLICATION_PROPERTY build-in in Oracle Forms allow one to change the mouse pointer.
Eg: SET_APPLICATION_PROPERTY(CURSOR_STYLE, BUSY);

Why doesn't my messages show on the screen?
Regardless of whether you call the MESSAGE() built-in with ACKNOWLEDGE, NO_ACKNOWLEDGE, or with no mode specification at all, your message may or may not be displayed. This is because messages are displayed asynchronously. To display messages immediately, use the SYNCHRONIZE build-in: message('...'); synchronize; This can also be used to execute a query while the user is looking at the results of a previous query.

What happened to SQL*Menu?
Answer: SQL*Menu is now fully integrated into Oracle Forms 4.5.Application menus can be added to your application by creating Menu Modules (*.MMB) and generate it to Menu Module Executables (*.MMX).

Can a button have icon and label at the same time?
NO

What is mouse navigate property of button
When Mouse Navigate is True (the default), Oracle Forms performs standard navigation to move the focus to the item when the operator activates the item with the mouse.
When Mouse Navigate is set to False, Oracle Forms does not perform navigation (and the resulting validation) to move to the item when an operator activates the item with the mouse.

What is FORMS_MDI_WINDOW
forms run inside the MDI application window. This property is useful for calling a form from another one.

Can object group have a block
Yes, object group can have block as well as program units.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.