Home » Developer & Programmer » Forms » How to load a form referring other modules by API?
icon8.gif  How to load a form referring other modules by API? [message #124664] Mon, 20 June 2005 17:22
jeffrey_li
Messages: 2
Registered: June 2005
Junior Member
I am trying to write a migration process for Oracle Forms
(6i and 9i) by API. However, some forms refers other module
types,such as Object library and/or PL/SQL library.
Before loading these forms, the referred modules must be
loaded into memory. Because all forms are processed in batch
mode, I have following issues.
1. How to identify a form if referring other modules
before loading?
For example, loading a form without any reference module
will be failed if loading reference modules in force
because my process is a batch mode.
2. If a form contains other reference modules, I guess
the reference modules must be loaded into memory
before loading the form.
METHOD-1: Form and reference modules use a common API
context. Here is a sample code.(6i)
-- NOTE: ctx is same for all modules
--------------------------------
attr.mask_d2fctxa = (ub4)0;
//create a common context
status = d2fctxcr_Create(&ctx, &attr);
if(status == D2FS_SUCCESS){
status = d2fctxcn_Connect(ctx, (text *)db_connect_str, NULL);
}
/* load pll before loading form */
if(status == D2FS_SUCCESS){
status = d2folbld_Load(ctx, &pll_ptr, (text *)pll_file_name, FALSE);
}

/* load olb before loading form */
if(status == D2FS_SUCCESS){
status = d2folbld_Load(ctx, &olb_ptr, (text *)olb_file_name, FALSE);
}

/* load form */
if(status == D2FS_SUCCESS){
// ******** FAILED AT HERE
status = d2ffmdld_Load(ctx, &fm_ptr, (text *)form_file_name, FALSE);
}
METHOD-2: Create different context for different modules.
However, how can I establish an internal relation
before loading a form?
-------------------------------------------------
Million thanks for any help.

Jeffrey Li
Previous Topic: Forms 6 <-> Oracle 10g a working combination ?
Next Topic: How to load a form referring other modules by API?
Goto Forum:
  


Current Time: Fri Sep 20 05:39:22 CDT 2024