A script-enabled browser is required for this page to function properly.

Modifying Modules Using the Open API

To modify a basic Oracle Forms module:

  1. Include the appropriate C header files in your C source code.
  2. Make calls to the desired APIs in your C source code:
  3. Generate an .FMX or .MMX compiled form using the appropriate "CompileFile()" function.
  4. Make the required function calls to save the associated module (for example, d2ffmdsv_Save() for a form module, d2fmmdsv_Save() for a menu module, or d2folbsv_Save() for an object library).
  5. Finally, call the context destroy function, d2fctxde_Destroy(), to destroy the Open Forms API context.

    Note that this function call must be your final one.

  6. Link your source files against the Open API library (frmd2f.lib).
  7. Compile the files to create an executable (.EXE file).
  8. Run the executable to modify one or more Form modules (.FMB).

Modifying modules using the Open API Examples

This example determines if the Oracle Forms object is a subclassed object and returns the file path of the parent to NULL if the object is subclassed. This sample only processes the following object types: form level triggers, alerts, blocks, items, item level triggers, radio buttons, and block level triggers. Use a similar method to process other object types.


#include <stdio.h>
#include <string.h>
#include <windows.h>
#include <d2ferr.h>
#include <d2fctx.h>
#include <d2ffmd.h>
#include <d2fblk.h>
#include <d2fitm.h>
#include <d2falt.h>
#include <d2ftrg.h>
#include <d2frdb.h>


#define BUFSIZE 128

int WINAPI WinMain(HANDLE hInstance,
HANDLE hPrevInstance,
LPSTR lpszCommandLine,
int cmdShow)
{
d2fctx* pd2fctx;
d2ffmd* pd2ffmd;
d2fblk* pd2fblk;
d2fitm* pd2fitm;
d2fctxa d2fctx_attr;
d2fstatus status;
d2falt* pd2falt;
d2ftrg* pd2ftrg;
d2frdb* pd2frdb;


int counter;

char buf[BUFSIZE];
char* form_name=(char*)0;

/* Get the form name from the command line */
strncpy(buf, lpszCommandLine, BUFSIZE);
form_name = strtok(buf, ".");

/* Initialize the attribute mask */
d2fctx_attr.mask_d2fctxa = 0;

/* Create the API context */
status = d2fctxcr_Create(&pd2fctx, &d2fctx_attr);

/* Load the form */
status = d2ffmdld_Load(pd2fctx, &pd2ffmd, form_name, FALSE) ;



if (status == D2FS_SUCCESS)
{
/*** Process Form Level Trigger Objects ***/
for(status = d2ffmdg_trigger(pd2fctx,pd2ffmd,&pd2ftrg);
pd2ftrg != NULL;
status = d2ftrgg_next(pd2fctx,pd2ftrg,&pd2ftrg))
{
if (d2ftrgis_IsSubclassed(pd2fctx,pd2ftrg) == D2FS_YES)
d2ftrgs_par_flpath(pd2fctx,pd2ftrg,NULL);
}



/*** Process Alert Objects ***/
for(status = d2ffmdg_alert(pd2fctx,pd2ffmd,&pd2falt);
pd2falt != NULL;
status = d2faltg_next(pd2fctx,pd2falt,&pd2falt))
{
if (d2faltis_IsSubclassed(pd2fctx,pd2falt) == D2FS_YES)
d2falts_par_flpath(pd2fctx,pd2falt,NULL);
}


/*** Process Block Objects ***/
for(status = d2ffmdg_block(pd2fctx,pd2ffmd,&pd2fblk);
pd2fblk != NULL;
status = d2fblkg_next(pd2fctx,pd2fblk,&pd2fblk))
{
if (d2fblkis_IsSubclassed(pd2fctx,pd2fblk) == D2FS_YES)
d2fblks_par_flpath(pd2fctx,pd2fblk,NULL);
}


/* Process Item Objects */
for(status = d2fblkg_item(pd2fctx,pd2fblk,&pd2fitm);
pd2fitm != NULL;
status = d2fitmg_next(pd2fctx,pd2fitm,&pd2fitm))
{
if (d2fitmis_IsSubclassed(pd2fctx,pd2fitm) == D2FS_YES)
d2fitms_par_flpath(pd2fctx,pd2fitm,NULL);

/* Process Item Level Trigger Objects */
for(status = d2fitmg_trigger(pd2fctx,pd2fitm,&pd2ftrg);
pd2ftrg != NULL;
status = d2ftrgg_next(pd2fctx,pd2ftrg,&pd2ftrg))
{
if (d2ftrgis_IsSubclassed(pd2fctx,pd2ftrg)==D2FS_YES)
{
d2ftrgs_par_flpath(pd2fctx,pd2ftrg,NULL);
printf("item trigger is Subclassed/n"
}
else if (d2ftrgis_IsSubclassed(pd2fctx,
pd2ftrg)==D2FS_NO)
printf("item trigger is NOT Subclassed/n");
}


/* Process Radio Button Objects *
for(status = d2fitmg_rad_but(pd2fctx,pd2fitm,&pd2frdb);
pd2frdb != NULL;
status = d2frdbs_next(pd2fctx,pd2frdb,&pd2frdb))
{
if (d2frdbis_IsSubclassed(pd2fctx,pd2frdb)==D2FS_YES
{
d2frdbs_par_flpath(pd2fctx,pd2frdb,NULL);
printf("radio button is Subclassed/n");
}
else if (d2frdbis_IsSubclassed(pd2fctx,
pd2frdb)==D2FS_NO)
printf("radio button is NOT Subclassed/n");
}
}



/* Process Block Level Trigger Objects */
for(status = d2fblkg_trigger(pd2fctx,pd2fblk,&pd2ftrg);
pd2ftrg != NULL;
status = d2ftrgg_next(pd2fctx,pd2ftrg,&pd2ftrg))
{
if (d2ftrgis_IsSubclassed(pd2fctx,pd2ftrg) == D2FS_YES)
{
d2ftrgs_par_flpath(pd2fctx,pd2ftrg,NULL);
printf("block trigger is Subclassed/n");
}
else if (d2ftrgis_IsSubclassed(pd2fctx,
pd2ftrg)==D2FS_NO)
printf("block trigger is NOT Subclassed/n");
}


/* Save out the form */
d2ffmdsv_Save(pd2fctx, pd2ffmd, (text *)0, FALSE) ;

/* Generate the forms executable (fmx) */
d2ffmdcf_CompileFile(pd2fctx, pd2ffmd ) ;

/* Destroy the API Context */
d2fctxde_Destroy(pd2fctx) ;

}
}

Open API Examples

This section includes several examples that describe how to use the Open API.

This example determines if the Oracle Forms object is a subclassed object and returns the file path of the parent to NULL if the object is subclassed. This sample only processes the following object types: form level triggers, alerts, blocks, items, item level triggers, radio buttons, and block level triggers. Use a similar method to process other object types.

Modifying modules using the Open API:

#include <stdio.h>
#include <string.h>
#include <windows.h>
#include <d2ferr.h>
#include <d2fctx.h>
#include <d2ffmd.h>
#include <d2fblk.h>
#include <d2fitm.h>
#include <d2falt.h>
#include <d2ftrg.h>
#include <d2frdb.h>
#define BUFSIZE 128
int WINAPI WinMain(HANDLE hInstance,

HANDLE hPrevInstance,  LPSTR lpszCommandLine,  int cmdShow)  {

d2fctx* pd2fctx;  d2ffmd* pd2ffmd;  d2fblk* pd2fblk;  d2fitm* pd2fitm;  d2fctxa d2fctx_attr;  d2fstatus status;  d2falt* pd2falt;  d2ftrg* pd2ftrg;  d2frdb* pd2frdb;  int counter;  char buf[BUFSIZE];  char* form_name=(char*)0;  /* Get the form name from the command line */  
strncpy(buf, lpszCommandLine, BUFSIZE);   form_name = strtok(buf, "."); 

/* Initialize the attribute mask */ 
d2fctx_attr.mask_d2fctxa = 0;


/* for MS Windows-only attributes */
d2fctx_attr.d2fihnd_d2fctxa = hInstance; 
d2fctx_attr.d2fphnd_d2fctxa = hPrevInstance; 

d2fctx_attr.d2fcmsh_d2fctxa = cmdShow;
 

/* Create the API context */ 
status = d2fctxcr_Create(&pd2fctx, &d2fctx_attr); 

/* Load the form */  
status = d2ffmdld_Load(pd2fctx, &pd2ffmd, form_name, FALSE) ;  
if (status == D2FS_D2FS_SUCCESS) 


/*** Process Form Level Trigger Objects ***/ 

for(status = d2ffmdg_trigger(pd2fctx,pd2ffmd,&pd2ftrg);

pd2ftrg != NULL; 
status = d2ftrgg_next(pd2fctx,pd2ftrg,&pd2ftrg)) 
{   if (d2ftrgis_IsSubclassed(pd2fctx,pd2ftrg) == D2FS_YES)  
d2ftrgs_par_flpath(pd2fctx,pd2ftrg,NULL); 



/*** Process Alert Objects ***/ 

for(status = d2ffmdg_alert(pd2fctx,pd2ffmd,&pd2falt); 
pd2falt != NULL;  status = d2faltg_next(pd2fctx,pd2falt,&pd2falt))  
if (d2faltis_IsSubclassed(pd2fctx,pd2falt) == D2FS_YES)  d2falts_par_flpath(pd2fctx,pd2falt,NULL);  


/*** Process Block Objects ***/ 
for(status = d2ffmdg_block(pd2fctx,pd2ffmd,&pd2fblk);  pd2fblk != NULL;  status = d2fblkg_next(pd2fctx,pd2fblk,&pd2fblk))  
{  
if (d2fblkis_IsSubclassed(pd2fctx,pd2fblk) == D2FS_YES)  d2fblks_par_flpath(pd2fctx,pd2fblk,NULL); 


/* Process Item Objects */
for(status = d2fblkg_item(pd2fctx,pd2fblk,&pd2fitm); 
pd2fitm != NULL;  status = d2fitmg_next(pd2fctx,pd2fitm,&pd2fitm))  
{
  if (d2fitmis_IsSubclassed(pd2fctx,pd2fitm) == D2FS_YES)  d2fitms_par_flpath(pd2fctx,pd2fitm,NULL);  

/* Process Item Level Trigger Objects */ 

for(status = d2fitmg_trigger(pd2fctx,pd2fitm,&pd2ftrg);
pd2ftrg != NULL;  status = d2ftrgg_next(pd2fctx,pd2ftrg,&pd2ftrg))  
{  
if (d2ftrgis_IsSubclassed(pd2fctx,pd2ftrg)==D2FS_YES) 

d2ftrgs_par_flpath(pd2fctx,pd2ftrg,NULL);  printf("item trigger is Subclassed/n"  else if (d2ftrgis_IsSubclassed(pd2fctx,  pd2ftrg)==D2FS_NO)  printf("item trigger is NOT Subclassed/n"); 


/* Process Radio Button Objects * 
for(status = d2fitmg_rad_but(pd2fctx,pd2fitm,&pd2frdb); 
pd2frdb != NULL; 
status = d2frdbs_next(pd2fctx,pd2frdb,&pd2frdb))  
{
  if (d2frdbis_IsSubclassed(pd2fctx,pd2frdb)==D2FS_YES 

d2frdbs_par_flpath(pd2fctx,pd2frdb,NULL);   printf("radio button is Subclassed/n"); 

else if (d2frdbis_IsSubclassed(pd2fctx,  pd2frdb)==D2FS_NO)  printf("radio button is NOT Subclassed/n"); 

}  


/* Process Block Level Trigger Objects */  

for(status = d2fblkg_trigger(pd2fctx,pd2fblk,&pd2ftrg); 

pd2ftrg != NULL; 
status = d2ftrgg_next(pd2fctx,pd2ftrg,&pd2ftrg))  

if (d2ftrgis_IsSubclassed(pd2fctx,pd2ftrg) == D2FS_YES) 

d2ftrgs_par_flpath(pd2fctx,pd2ftrg,NULL);  
printf("block trigger is Subclassed/n");  

else if (d2ftrgis_IsSubclassed(pd2fctx, 
pd2ftrg)==D2FS_NO)  printf("block trigger is NOT Subclassed/n"); 
 

/* Save out the form */ 

d2ffmdsv_Save(pd2fctx, pd2ffmd, (text *)0, FALSE) ;  

/* Generate the forms executable (fmx) */ 

d2ffmdcf_CompileFile(pd2fctx, pd2ffmd ) ;  


/* Destroy the API Context */ 

d2fctxde_Destroy(pd2fctx) ;
}
}

 

Creating modules using the Open API:

This example creates a master-detail form based on the dept and emp database tables owned by the user scott. The master contains the following fields: empno, ename, job, sal, and deptno. The detail contains the following fields deptno, dname, and loc. The join condition is deptno.

#include<stdio.h>
#include<string.h>
#include<windows.h>
#include<d2fctx.h>
#include<d2ffmd.h>
#include<d2ffpr.h>
#include<d2fob.h>
#include<d2fcnv.h>
#include<d2ftrg.h>
#include<d2blk.h>
#include<d2fitm.h>
#include<d2fwin.h>
#include<d2frel.h>
#define D2FS_SUCCESS 0
#define FAIL 1
#define BUFSIZE 128
#define WBP_TXT "null;/n"
int WINAPI WinMain(HANDLE hInstance,

HANDLE hPrevInstance,  LPSTR lpszCommandLine,  int cmdShow)  {

d2fctx *pd2fctx;
d2ffmd *pd2ffmd;
d2fcnv *pd2fcnv;
d2fwin *pd2fwin;
d2fblk *pempblk;
d2fblk *pdeptblk;
d2frel *pd2frel;
d2fitm *pEempnoitm;
d2fitm *pEenameitm;
d2fitm *pEjobitm;
d2fitm *pEsalitm;
d2fitm *pEdeptnoitm;
d2fitm *pDdeptnoitm;
d2fitm *pDdnameitm;
d2fitm *pDlocitm;

text *name = (text *)0;
text *form_name = (text *)0;
d2fctxa d2fctx_attr;
d2fstatus retval;
char buf[BUFSIZE];

/* Get form name */

strncpy(buf, "empdept", BUFSIZE);
form_name = (text*)strtok(buf, ".");

/* Initialize the attribute mask */

d2fctx_attr.mask_d2fctxa = 0;

/* for MS Windows-only attributes */

d2fctx_attr.d2fihnd_d2fctxa = hInstance;
d2fctx_attr.d2fphnd_d2fctxa = hPrevInstance;
d2fctx_attr.d2fcmsh_d2fctxa = cmdShow;

/* Create the API context */

status = d2fctxcr_Create(&pd2fctx, &d2fctx_attr);

/* Create the context */

d2fctxcn_Connect(pd2fctx, (text*)"scott/tiger@test");

/* Create the form */

d2ffmdcr_Create(pd2fctx, &pd2ffmd, form_name);


/* Create a window */

d2fwincr_Create(pd2fctx,pd2ffmd,&pd2fwin,(text*)"MYWIN");

/*** Create Canvas and set canvas-related properties ***/

/* Create a canvas */

d2fcnvcr_Create(pd2fctx, pd2ffmd, &pd2fcnv, (text*)"MYCANVAS");

/* Set viewport width */

d2fcnvs_vprt_wid(pd2fctx, pd2fcnv, 512);

/* Set viewport height */

d2fcnvs_vprt_hgt(pd2fctx, pd2fcnv, 403);

/* Set window */

dwfcnvs_wnd_obj(pd2fctx, pd2fcnv, pd2fwin);

/* Set viewport X-position */

d2fcnvs_vprt_x_pos(pd2fctx, pd2fcnv, 0);

/* Set viewport Y-position */

d2fcnvs_vprt_y_pos(pd2fctx, pd2fcnv, 0);

/* Set width */

d2fcnvs_width(pd2fctx, pd2fcnv, 538)

/* Set height */

d2fcnvs_height(pd2fctx, pd2fcnv, 403)

/*** Create Emp block and set block-related properties ***/

/* Create block */

d2fblkcr_Create(pd2fctx, pd2ffmd, &pempblk, (text*)"EMP");

/* Set to database block */

d2fblks_db_blk(pd2fctx, pempblk, TRUE);

/* Set query data source to Table */

d2fblks_qry_dat_src_typ(pd2fctx, pempblk, D2FC_QRDA_TABLE);

/* Set query data source name to EMP table */

d2fblks_qry_dat_src_nam(pd2fctx, pempblk, "EMP");

/* Set DML data source type to Table */

d2fblks_dml_dat_typ(Pd2fctx, pempblk, D2FC_DMDA_TABLE);

/* Set DML data source name to EMP table */

d2fblks_dml_dat_nam(pd2fctx, pempblk, (text*)"EMP");

/*** Create Dept block and set block-related properties ***/

/* Create block */

d2fblkcr_Create(pd2fctx, pd2ffmd, &pdeptblk, (text*)"DEPT");

/* Set to database block */

d2fblks_db_blk(pd2fctx, pdeptblk, TRUE);

/* Set query data source to Table */

d2fblks_qry_dat_src_typ(pd2fctx, pdeptblk, D2FC_QRDA_TABLE);

/* Set query data source name to EMP table */

d2fblks_qry_dat_src_nam(pd2fctx, pdeptblk, "DEPT");

/* Set DML data source type to Table */

d2fblks_dml_dat_typ(Pd2fctx, pdeptblk, D2FC_DMDA_TABLE);

/* Set DML data source name to EMP table */

d2fblks_dml_dat_nam(pd2fctx, pdeptblk, (text*)"DEPT");


/*** Create empno item and item-related properties ***/
/* Create item */

d2fitmcr_Create(pd2fctx, pempblk, &pEempnoitm, (text*)"EMPNO");
/* Set item type */

d2fitms_itm_type(pd2fctx, pEempnoitm, D2FC_ITTY_TI);
/* Set Enable property */

d2fitms_enabled(pd2fctx, pEempnoitm, TRUE);
/* Set item (keyboard) navigable property */

d2fitms_kbrd_navigable(pd2fctx, pEempnoitm, TRUE);
/* Set item Data Type property */

d2fitms_dat_typ(pd2fctx, pEempnoitm, D2FC_DATY_NUMBER);
/* Set item Max Length property */

d2fitms_max_len(pd2fctx, pEempnoitm, 6);
/* Set item Required property */

d2fitms_required(pd2fctx, pEempnoitm, TRUE);
/* Set Distance Between Records property */

d2fitms_dist_btwn_recs(pd2fctx, pEempnoitm, 0);
/* Set Database block(Database Item) property */

d2fitms_db_itm(pd2fctx, pEempnoitm, TRUE);
/* Set Query Allowed */

d2fitms_qry_allowed(pd2fctx, pEempnoitm, TRUE);
/* Set Query Length */

d2fitms_qry_len(pd2fctx, pEempnoitm, 6);
/* Set Update Allowed */

d2fitms_updt_allowed(pd2fctx, pEempnoitm, TRUE);
/* Set Item Displayed (Visible) */

d2fitms_visible(pd2fctx, pEempnoitm, TRUE);
/* Set Item Canvas property */

d2fitms_cnv_obj(pd2fctx, pEempnoitm, pd2fcnv);
/* Set Item X-position */

d2fitms_x_pos(pd2fctx, pEempnoitm, 32);
/* Set Item Y-position */

d2fitms_y_pos(pd2fctx, pEempnoitm, 50);
/* Set Item Width */

d2fitms_width(pd2fctx, pEempnoitm, 51);
/* Set Item Height */

d2fitms_height(pd2fctx, pEempnoitm, 17);
/* Set Item Bevel */

d2fitms_bevel(pd2fctx, pEempnoitm, D2FC_BEST_LOWERED);
/* Set item Hint */

d2fitms_hint(pd2fctx, PEempnoitm, (text*)"Enter value for :EMPNO");
/*** Create Ename item and item-related properties ***/
/* Create item */

d2fitmcr_Create(pd2fctx, pempblk, &pEenameitm, (text*)"ENAME");
/* Set item type */

d2fitms_itm_type(pd2fctx, pEenameitm, D2FC_ITTY_TI);
/* Set Enable property */

d2fitms_enabled(pd2fctx, pEenameitm, TRUE);
/* Set item (keyboard) navigable property */

d2fitms_kbrd_navigable(pd2fctx, pEenameitm, TRUE);
/* Set item Data Type property */

d2fitms_dat_typ(pd2fctx, pEenameitm, D2FC_DATY_CHAR);
/* Set item Max Length property */

d2fitms_max_len(pd2fctx, pEenameitm, 10);
/* Set Distance Between Records property */

d2fitms_dist_btwn_recs(pd2fctx, pEenameitm, 0);
/* Set Database block(Database Item) property */

d2fitms_db_itm(pd2fctx, pEenameitm, TRUE);
/* Set Query Allowed */

d2fitms_qry_allowed(pd2fctx, pEenameitm, TRUE);
/* Set Query Length */

d2fitms_qry_len(pd2fctx, pEenameitm, 10);
/* Set Update Allowed */

d2fitms_updt_allowed(pd2fctx, pEenameitm, TRUE);
/* Set Item Displayed (Visible) */

d2fitms_visible(pd2fctx, pEenameitm, TRUE);
/* Set Item Canvas property */

d2fitms_cnv_obj(pd2fctx, pEenameitm, pd2fcnv);
/* Set Item X-position */

d2fitms_x_pos(pd2fctx, pEenameitm, 83);
/* Set Item Y-position */

d2fitms_y_pos(pd2fctx, pEenameitm, 50);
/* Set Item Width */

d2fitms_width(pd2fctx, pEenameitm, 77);
/* Set Item Height */

d2fitms_height(pd2fctx, pEenameitm, 17);
/* Set Item Bevel */

d2fitms_bevel(pd2fctx, pEenameitm, D2FC_BEST_LOWERED);
/* Set item Hint */

d2fitms_hint(pd2fctx, PEenameitm, (text*)"Enter value for :ENAME");
/*** Create JOB item and item-related properties ***/
/* Create item */

d2fitmcr_Create(pd2fctx, pempblk, &pEjobitm, (text*)"JOB");
/* Set item type */

d2fitms_itm_type(pd2fctx, pEjobitm, D2FC_ITTY_TI);
/* Set Enable property */

d2fitms_enabled(pd2fctx, pEjobitm, TRUE);
/* Set item (keyboard) navigable property */

d2fitms_kbrd_navigable(pd2fctx, pEjobitm, TRUE);
/* Set item Data Type property */

d2fitms_dat_typ(pd2fctx, pEjobitm, D2FC_DATY_CHAR);
/* Set item Max Length property */

d2fitms_max_len(pd2fctx, pEjobitm, 9);
/* Set Distance Between Records property */

d2fitms_dist_btwn_recs(pd2fctx, pEjobitm, 0);
/* Set Database block(Database Item) property */

d2fitms_db_itm(pd2fctx, pEjobitm, TRUE);
/* Set Query Allowed */

d2fitms_qry_allowed(pd2fctx, pEjobitm, TRUE);
/* Set Query Length */

d2fitms_qry_len(pd2fctx, pEjobitm, 9);
/* Set Update Allowed */

d2fitms_updt_allowed(pd2fctx, pEjobitm, TRUE);
/* Set Item Displayed (Visible) */

d2fitms_visible(pd2fctx, pEjobitm, TRUE);
/* Set Item Canvas property */

d2fitms_cnv_obj(pd2fctx, pEjobitm, pd2fcnv);
/* Set Item X-position */

d2fitms_x_pos(pd2fctx, pEjobitm, 160);
/* Set Item Y-position */

d2fitms_y_pos(pd2fctx, pEjobitm, 50);
/* Set Item Width */

d2fitms_width(pd2fctx, pEjobitm, 70);
/* Set Item Height */

d2fitms_height(pd2fctx, pEjobitm, 17);
/* Set Item Bevel */

d2fitms_bevel(pd2fctx, pEjobitm, D2FC_BEST_LOWERED);
/* Set item Hint */

d2fitms_hint(pd2fctx, PEjobitm, (text*)"Enter value for :JOB");

/*** Create SALARY item and item-related properties ***/
/* Create item */

d2fitmcr_Create(pd2fctx, pempblk, &pEsalitm, (text*)"SAL");
/* Set item type */

d2fitms_itm_type(pd2fctx, pEsalitm, D2FC_ITTY_TI);
/* Set Enable property */

d2fitms_enabled(pd2fctx, pEsalitm, TRUE);
/* Set item (keyboard) navigable property */

d2fitms_kbrd_navigable(pd2fctx, pEsalitm, TRUE);
/* Set item Data Type property */

d2fitms_dat_typ(pd2fctx, pEsalitm, D2FC_DATY_NUMBER);
/* Set item Max Length property */

d2fitms_max_len(pd2fctx, pEsalitm, 9);
/* Set Distance Between Records property */

d2fitms_dist_btwn_recs(pd2fctx, pEsalitm, 0);
/* Set Database block(Database Item) property */

d2fitms_db_itm(pd2fctx, pEsalitm, TRUE);
/* Set Query Allowed */

d2fitms_qry_allowed(pd2fctx, pEsalitm, TRUE);
/* Set Query Length */

d2fitms_qry_len(pd2fctx, pEsalitm, 9);
/* Set Update Allowed */

d2fitms_updt_allowed(pd2fctx, pEsalitm, TRUE);
/* Set Item Displayed (Visible) */

d2fitms_visible(pd2fctx, pEsalitm, TRUE);
/* Set Item Canvas property */

d2fitms_cnv_obj(pd2fctx, pEsalitm, pd2fcnv);
/* Set Item X-position */

d2fitms_x_pos(pd2fctx, pEsalitm, 352);
/* Set Item Y-position */

d2fitms_y_pos(pd2fctx, pEsalitm, 50);
/* Set Item Width */

d2fitms_width(pd2fctx, pEsalitm, 70);
/* Set Item Height */

d2fitms_height(pd2fctx, pEsalitm, 17);
/* Set Item Bevel */

d2fitms_bevel(pd2fctx, pEsalitm, D2FC_BEST_LOWERED);
/* Set item Hint */

d2fitms_hint(pd2fctx, PEsalitm, (text*)"Enter value for :SAL");
/*** Create DEPTNO item and item-related properties ***/
/* Create item */

d2fitmcr_Create(pd2fctx, pempblk, &pEdeptnoitm, (text*)"DEPTNO");
/* Set item type */

d2fitms_itm_type(pd2fctx, pEdeptnoitm, D2FC_ITTY_TI);
/* Set Enable property */

d2fitms_enabled(pd2fctx, pEdeptnoitm, TRUE);
/* Set item (keyboard) navigable property */

d2fitms_kbrd_navigable(pd2fctx, pEdeptnoitm, TRUE);
/* Set item Data Type property */

d2fitms_dat_typ(pd2fctx, pEdeptnoitm, D2FC_DATY_NUMBER);
/* Set item Max Length property */

d2fitms_max_len(pd2fctx, pEdeptnoitm, 4);
/*Set item Required property */

d2fitms_required(pd2fctx, pEdeptnoitm, TRUE);
/* Set Distance Between Records property */

d2fitms_dist_btwn_recs(pd2fctx, pEdeptnoitm, 0);
/* Set Database block(Database Item) property */

d2fitms_db_itm(pd2fctx, pEdeptnoitm, TRUE);
/* Set Query Allowed */

d2fitms_qry_allowed(pd2fctx, pEdeptnoitm, TRUE);
/* Set Query Length */

d2fitms_qry_len(pd2fctx, pEdeptnoitm, 4);
/* Set Update Allowed */

d2fitms_updt_allowed(pd2fctx, pEdeptnoitm, TRUE);
/* Set Item Displayed (Visible) */

d2fitms_visible(pd2fctx, pEdeptnoitm, TRUE);
/* Set Item Canvas property */

d2fitms_cnv_obj(pd2fctx, pEdeptnoitm, pd2fcnv);
/* Set Item X-position */

d2fitms_x_pos(pd2fctx, pEdeptnoitm, 493);
/* Set Item Y-position */

d2fitms_y_pos(pd2fctx, pEdeptnoitm, 50);
/* Set Item Width */

d2fitms_width(pd2fctx, pEdeptnoitm, 30);
/* Set Item Height */

d2fitms_height(pd2fctx, pEdeptnoitm, 17);
/* Set Item Bevel */

d2fitms_bevel(pd2fctx, pEdeptnoitm, D2FC_BEST_LOWERED);
/* Set item Hint */

d2fitms_hint(pd2fctx, PEdeptnoitm, (text*)"Enter value for :DEPTNO");
/*** Create DEPTNO item and item-related properties ***/
/* Create item */

d2fitmcr_Create(pd2fctx, pdeptblk, &pDdeptnoitm, (text*)"DEPTNO");
/* Set item type */

d2fitms_itm_type(pd2fctx, pDdeptnoitm, D2FC_ITTY_TI);
/* Set Enable property */

d2fitms_enabled(pd2fctx, pDdeptnoitm, TRUE);
/* Set item (keyboard) navigable property */

d2fitms_kbrd_navigable(pd2fctx, pDdeptnoitm, TRUE);
/* Set item Data Type property */

d2fitms_dat_typ(pd2fctx, pDdeptnoitm, D2FC_DATY_NUMBER);
/* Set item Max Length property */

d2fitms_max_len(pd2fctx, pDdeptnoitm, 4);
/*Set item Required property */

d2fitms_required(pd2fctx, pDdeptnoitm, TRUE);
/* Set Distance Between Records property */

d2fitms_dist_btwn_recs(pd2fctx, pDdeptnoitm, 0);
/* Set Database block(Database Item) property */

d2fitms_db_itm(pd2fctx, pDdeptnoitm, TRUE);
/* Set Query Allowed */

d2fitms_qry_allowed(pd2fctx, pDdeptnoitm, TRUE);
/* Set Query Length */

d2fitms_qry_len(pd2fctx, pDdeptnoitm, 4);
/* Set Update Allowed */

d2fitms_updt_allowed(pd2fctx, pDdeptnoitm, TRUE);
/* Set Item Displayed (Visible) */

d2fitms_visible(pd2fctx, pDdeptnoitm, TRUE);
/* Set Item Canvas property */

d2fitms_cnv_obj(pd2fctx, pDdeptnoitm, pd2fcnv);
/* Set Item X-position */

d2fitms_x_pos(pd2fctx, pDdeptnoitm, 32);
/* Set Item Y-position */

d2fitms_y_pos(pd2fctx, pDdeptnoitm, 151);
/* Set Item Width */

d2fitms_width(pd2fctx, pDdeptnoitm, 38);
/* Set Item Height */

d2fitms_height(pd2fctx, pDdeptnoitm, 17);
/* Set Item Bevel */

d2fitms_bevel(pd2fctx, pDdeptnoitm, D2FC_BEST_LOWERED);
/* Set item Hint */

d2fitms_hint(pd2fctx, PDdeptnoitm, (text*)"Enter value for :DEPTNO");
/*** Create DNAME item and item-related properties ***/
/* Create item */

d2fitmcr_Create(pd2fctx, pdeptblk, &pDdnameitm, (text*)"DNAME");
/* Set item type */

d2fitms_itm_type(pd2fctx, pDdnameitm, D2FC_ITTY_TI);
/* Set Enable property */

d2fitms_enabled(pd2fctx, pDdnameitm, TRUE);
/* Set item (keyboard) navigable property */

d2fitms_kbrd_navigable(pd2fctx, pDdnameitm, TRUE);
/* Set item Data Type property */

d2fitms_dat_typ(pd2fctx, pDdnameitm, D2FC_DATY_CHAR);
/* Set item Max Length property */

d2fitms_max_len(pd2fctx, pDdnameitm, 14);
/* Set Distance Between Records property */

d2fitms_dist_btwn_recs(pd2fctx, pDdnameitm, 0);
/* Set Database block(Database Item) property */

d2fitms_db_itm(pd2fctx, pDdnameitm, TRUE);
/* Set Query Allowed */

d2fitms_qry_allowed(pd2fctx, pDdnameitm, TRUE);
/* Set Query Length */

d2fitms_qry_len(pd2fctx, pDdnameitm, 14);
/* Set Update Allowed */

d2fitms_updt_allowed(pd2fctx, pDdnameitm, TRUE);
/* Set Item Displayed (Visible) */

d2fitms_visible(pd2fctx, pDdnameitm, TRUE);
/* Set Item Canvas property */

d2fitms_cnv_obj(pd2fctx, pDdnameitm, pd2fcnv);
/* Set Item X-position */

d2fitms_x_pos(pd2fctx, pDdnameitm, 70);
/* Set Item Y-position */

d2fitms_y_pos(pd2fctx, pDdnameitm, 151);
/* Set Item Width */

d2fitms_width(pd2fctx, pDdnameitm, 102);
/* Set Item Height */

d2fitms_height(pd2fctx, pDdnameitm, 17);
/* Set Item Bevel */

d2fitms_bevel(pd2fctx, pDdnameitm, D2FC_BEST_LOWERED);
/* Set item Hint */

d2fitms_hint(pd2fctx, PDdnameitm, (text*)"Enter value for :DNAME");
/*** Create LOC item and item-related properties ***/
/* Create item */

d2fitmcr_Create(pd2fctx, pdeptblk, &pDlocitm, (text*)"LOC");
/* Set item type */

d2fitms_itm_type(pd2fctx, pDlocitm, D2FC_ITTY_TI);
/* Set Enable property */

d2fitms_enabled(pd2fctx, pDlocitm, TRUE);
/* Set item (keyboard) navigable property */

d2fitms_kbrd_navigable(pd2fctx, pDlocitm, TRUE);
/* Set item Data Type property */

d2fitms_dat_typ(pd2fctx, pDlocitm, D2FC_DATY_CHAR);
/* Set item Max Length property */

d2fitms_max_len(pd2fctx, pDlocitm, 13);
/* Set Distance Between Records property */

d2fitms_dist_btwn_recs(pd2fctx, pDlocitm, 0);
/* Set Database block(Database Item) property */

d2fitms_db_itm(pd2fctx, pDlocitm, TRUE);
/* Set Query Allowed */

d2fitms_qry_allowed(pd2fctx, pDlocitm, TRUE);
/* Set Query Length */

d2fitms_qry_len(pd2fctx, pDlocitm, 13);
/* Set Update Allowed */

d2fitms_updt_allowed(pd2fctx, pDlocitm, TRUE);
/* Set Item Displayed (Visible) */

d2fitms_visible(pd2fctx, pDlocitm, TRUE);
/* Set Item Canvas property */

d2fitms_cnv_obj(pd2fctx, pDlocitm, pd2fcnv);
/* Set Item X-position */

d2fitms_x_pos(pd2fctx, pDlocitm, 173);
/* Set Item Y-position */

d2fitms_y_pos(pd2fctx, pDlocitm, 151);
/* Set Item Width */

d2fitms_width(pd2fctx, pDlocitm, 96);
/* Set Item Height */

d2fitms_height(pd2fctx, pDlocitm, 17);
/* Set Item Bevel */

d2fitms_bevel(pd2fctx, pDlocitm, D2FC_BEST_LOWERED);
/* Set item Hint */

d2fitms_hint(pd2fctx, PDlocitm, (text*)"Enter value for :LOC");
/*** Create Relations and relations-related properties ***/
/* Create Relation */

d2frelcr_Create(pd2fctx, (d2fob *)pdeptblk, &pd2frel, (text*)"DEPT_EMP");
/* Set Relation Detail block */

d2frels_detail_blk(pd2fctx, pd2frel, (text *)"EMP");
/* Set Master Deletes property */

d2frels_del_rec([pd2fctx, pd2frel, D2FC_DERE_NON_ISOLATED);
/* Set Deferred property */

d2frels_deferred(pd2ctx, pd2frel, FALSE);
/* Set Auto Query property */

d2frels_auto_qry(pd2ctx, pd2frel, FALSE);
/* Set Prevent Masterless property */

d2frels_prvnt_mstrless_ops(pd2ctx, pd2frel, FALSE);
/* Set Join Condition property */

d2frels_join_cond(pd2ctx, pd2frel, (text*)"DEPTNO");
/* Instantiate Relation: creates master-detail triggers */

d2frelup_Update(pd2fctx, pd2frel);
/* Save Form */

d2ffmdsv_Save(pd2fctx, pd2ffmd, (text*)0, FALSE, TRUE);
/* Compile Form */

d2ffmdcf_CompileFile(pd2fctx, pd2ffmd);
/* Destroy Context */

d2fctxde_Destroy(pd2fctx);


About the Open API

Creating modules using the Open API

About Open API header files

About Open API objects and relations

Open API properties by object

About Open API functions by objects

Open API macros by objects