When working on Oracle forms 6i , it crashes and exits suddenly without prompting me.
This caused me to lose hours and hours of work.
Here's a method to solve this using Windows Schedule Task to automatically backup the Forms 6i folder.
1# Assuming You are working on Windows Server 2003
2# Locate the folder Of forms and reports on your hard (eg: D:\FRMWY-POS )
3# Locate the destination where you want to make the Backup Folder (eg: E:\POS_Backup)
4#Open NOTEPAD and write the following code:
XCopy D:\FRMWY-POS /S /E E:\POS_Backup /R /I /Y
5# Save the file as "Backup.bat"
6#Go to Control Panel , Scheduled Tasks , Add Task
7# After browsing to the bat file open advanced properties for the task
8# Make the task repeat every 2 minutes or any time you want
9# You are done...
Auto Compile Multiple Forms and Reports without opening builder
Here's how to Compile Multiple Forms and Reports without opening forms builder or report builder .
open Notepad (or any text editor) , paste the following text:
@ECHO OFF
cls
Echo libraries compilation....
for %%f IN (*.pll) do ( frmcmp userid=user/pw@srv module=%%f batch=yes module_type=library compile_all=yes window_state=minimize & ECHO %%f )
ECHO libraries compilation finished ---
Echo menus compilation....
for %%f IN (*.mmb) do ( frmcmp userid=user/pw@srv module=%%f batch=yes module_type=menu compile_all=yes window_state=minimize & ECHO %%f )
ECHO menus compilation finished ---
Echo forms compilation....
for %%f IN (*.fmb) do ( frmcmp userid=user/pw@srv module=%%f batch=yes module_type=form compile_all=yes window_state=minimize & ECHO %%f )
ECHO forms compilation finished ---
Echo compiling reports ....
for %%f IN (*.rdf) do rwconverter userid=sit/sit@SIT batch=yes source=%%f stype=rdffile DTYPE=REPFILE compile_all=yes OVERWRITE=yes logfile=log.txt
window_state=minimize & ECHO %%f )
ECHO --------------------------------------------------------------------
ECHO Report Compilation complete
Then save it as "Compile.bat"
# replace userid=user/pw@srv with your own credentials
# place this bat file in folder which you need to compile forms in it
Whenever you need to compile forms and reports run this bat file.
Enjoy and learn others...
UPDATE :
If the previous batch file does not work try to replace frmcmp and rwconverter with the original EXE file in your Oracle folder , in my case it's :
d:\Oracle\Middleware\Oracle_Home\bin\frmcmp
d:\Oracle\Middleware\Oracle_Home\bin\rwconverter
It should work for all Oracle versions up to 12c
Thanks....
open Notepad (or any text editor) , paste the following text:
@ECHO OFF
cls
Echo libraries compilation....
for %%f IN (*.pll) do ( frmcmp userid=user/pw@srv module=%%f batch=yes module_type=library compile_all=yes window_state=minimize & ECHO %%f )
ECHO libraries compilation finished ---
Echo menus compilation....
for %%f IN (*.mmb) do ( frmcmp userid=user/pw@srv module=%%f batch=yes module_type=menu compile_all=yes window_state=minimize & ECHO %%f )
ECHO menus compilation finished ---
Echo forms compilation....
for %%f IN (*.fmb) do ( frmcmp userid=user/pw@srv module=%%f batch=yes module_type=form compile_all=yes window_state=minimize & ECHO %%f )
ECHO forms compilation finished ---
Echo compiling reports ....
for %%f IN (*.rdf) do rwconverter userid=sit/sit@SIT batch=yes source=%%f stype=rdffile DTYPE=REPFILE compile_all=yes OVERWRITE=yes logfile=log.txt
window_state=minimize & ECHO %%f )
ECHO --------------------------------------------------------------------
ECHO Report Compilation complete
Then save it as "Compile.bat"
# replace userid=user/pw@srv with your own credentials
# place this bat file in folder which you need to compile forms in it
Whenever you need to compile forms and reports run this bat file.
Enjoy and learn others...
UPDATE :
If the previous batch file does not work try to replace frmcmp and rwconverter with the original EXE file in your Oracle folder , in my case it's :
d:\Oracle\Middleware\Oracle_Home\bin\frmcmp
d:\Oracle\Middleware\Oracle_Home\bin\rwconverter
It should work for all Oracle versions up to 12c
Thanks....
Forms offline editor
While we are working on a large project which is serving HMS and ERP sectors for hundreds of customers , we need to edit specific parts in forms and reports like replacing Program units or modifying it .
I found a very cool tool called : FormsAPI master.
It's not free , but it's very awesome as it has many features like :
it can compare two forms
searching and replacing in multiple forms
this all while forms are closed
you can download it from here http://www.orcl-toolbox.com/formsapimaster/download
or from https://drive.google.com/file/d/11cI4l6ep7VHvCp-5cEBsT8MrgXzIJUv4/view?usp=sharing
Enjoy and learn others...
I found a very cool tool called : FormsAPI master.
It's not free , but it's very awesome as it has many features like :
it can compare two forms
searching and replacing in multiple forms
this all while forms are closed
you can download it from here http://www.orcl-toolbox.com/formsapimaster/download
or from https://drive.google.com/file/d/11cI4l6ep7VHvCp-5cEBsT8MrgXzIJUv4/view?usp=sharing
Enjoy and learn others...
Undo in Oracle forms
A good way to enable user to undo last changes , I found it by Mr. GERD blog.
,,
Retrieving data from the database and changing the data is really easy. But what, if the user changes data and want to do an UNDO?
Doing a new query is the easiest way. The limitations are:
- in a multi-record-block you have to position in the correct record after the query
- if the query was executed via ENTER-QUERY mode you can't jump to the old record because the query-result has changed.
So you have to use a new technique.
The solution is this function. All database-items get their old values back:
Doing a new query is the easiest way. The limitations are:
- in a multi-record-block you have to position in the correct record after the query
- if the query was executed via ENTER-QUERY mode you can't jump to the old record because the query-result has changed.
So you have to use a new technique.
The solution is this function. All database-items get their old values back:
PROCEDURE Undo IS V_Block VARCHAR2 (30) := :SYSTEM.CURSOR_BLOCK; V_Field VARCHAR2 (61); V_Item VARCHAR2 (61); BEGIN Validate (Item_Scope); IF :SYSTEM.RECORD_STATUS = 'CHANGED' THEN V_Field := Get_Block_Property (V_Block, FIRST_ITEM); V_Item := V_Block || '.' || V_Field; WHILE V_Field IS NOT NULL LOOP IF Get_Item_Property (V_Item, ITEM_TYPE) IN ('DISPLAY ITEM', 'CHECKBOX', 'LIST', 'RADIO GROUP', 'TEXT ITEM') AND Get_Item_Property (V_Item, BASE_TABLE) = 'TRUE' THEN COPY (Get_Item_Property (V_Item, DATABASE_VALUE), V_Item); END IF; V_Field := Get_Item_Property (V_Item, NextItem); V_Item := V_Block || '.' || V_Field; END LOOP; END IF; END;Best practice is to start this undo-procedure from a menu (e.g. EDIT - UNDO) or handle it through a shortcut. ,,
Multi-Select from DUAL
Here's a hidden trick inside SQL .
,,
An easy way to generate records from scratch is using an easy CONNECT BY against DUAL.
e.g. you need a Forms-LOV which shows the last 12 months.
So you have to create a record-group-select which gives you exactly 12 records. After that you combine it with sysdate. Let's see:
e.g. you need a Forms-LOV which shows the last 12 months.
So you have to create a record-group-select which gives you exactly 12 records. After that you combine it with sysdate. Let's see:
SELECT Level LVL FROM Dual CONNECT BY Level <= 12;
then you integrate the sysdate into the statement:
SELECT add_months (trunc (sysdate, 'MM'), -1*Level) Month FROM Dual CONNECT BY Level <= 12; ,,
Thanks to
Subscribe to:
Posts (Atom)