Determining a Forms location
Posted on 2004-03-31
Like most developers we have different servers and location for Oracle forms - I.E. DEVelopment, TEST, & PRODuction.
As developers we always work in the Development area. Then we promote our work to Test where tester does their stuff. Eventually the form is promoted to Production.
Now our tests are not full time dedicated testers. So they often work in production and in test.
They have their computers set up so that production forms are on the 'P' drive and the test forms on 'T' drive. When they are testing they have their registry setting set up to point the FORMS path to the 'T' Drive. When they are working in production they have their registry settings set up to point the FORMS path to the 'P' drive. They switch back and forth via a .bat file that changes their registry settings.
This appears to work in general and is the best solution we have found for them so far.
The issue occurs that sometimes the tester forget to reset their registry settings and run the TEST forms while logged into the production database. This can result in some bad data in production.
We have the forms show which database they are logged into. But we wanted to display which environment they where launch the forms from (DEV, TEST, or PROD).
How can you determine the launching location of a form? Identifying the drive letter would be usefully but the best would be if you could look at the under lying server (IE: \\DEV\forms\, \\TEST\forms\, \\PROD\forms\).
We do not want to change anything in the form from the TEST area to the PRODuction area. So by simply changing the code or forms title and then recompiling is not an acceptable choice. If the form passes in TEST then it promote into production with out being re-compiled. Any time a form is re-compiled it must be tested again. A 'WHEN-NEW-FORM-INSTANCE' program solution is what is needed.
Have something like:
the_username := upper(get_application_property (username));
the_instance := UPPER (get_application_property (connect_string));
set_window_property (MAIN_WIN, title, 'App Title ' || the_username || '@' || the_instance || ' on ' || the_FormsSource);
Just need to figure out how to determine the variable: the_FormsSource
I am Currently using FORMS 5, but will most likely upgrade to FORMS 6i in the next year or two.