Amir
Amir

Reputation: 1979

how to find oracle form version dynamically

I have few form which have different behavior in 6i version and 10g version.

right now I create a field and I set 6i or 10g to control the form but it is so boring .

I want to know is there any opportunity for us to recognize this form is 6icompiled or 10g dynamically?

Upvotes: 2

Views: 2725

Answers (1)

Ian Carpenter
Ian Carpenter

Reputation: 8626

I don't have a copy of Forms 6 but the following works on Forms 10g.

You can use the Forms built in, GET_APPLICATION_PROPERTY and pass it the constant VERSION to retrieve the version number.

Here is a simple form with a field and button. When the button is pressed it populates the field with the version of Oracle Forms I am using, in this case 10.1.2.0.2

enter image description here

The only code is on the WHEN-BUTTON-PRESSED trigger:

:CTRL.forms_version := GET_APPLICATION_PROPERTY(VERSION);

In this case I am returning the value into a field called forms_version which is found on a block called CTRL

Upvotes: 3

Related Questions