Forms API [message #84842] |
Mon, 03 May 2004 21:04 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Raj
Messages: 411 Registered: November 1998
|
Senior Member |
|
|
Hi,
I'm trying to document the Oracle forms. There are many fields in a block and I need to pickup certain properties from field. I'm using Forms API.
I'm using the following program for testing
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <d2fctx.h> /* Forms API context */
#include <d2ffmd.h> /* Form module header file */
int main (int argc, char *argv[[]])
{
d2fctxa ctx_attr;
d2fctx *ctx;
d2ffmd *form;
text *form_name;
/* Check arguments */
if ( argc != 2 )
{
fprintf(stderr, "USAGE: %s <filename>n", argv[[0]]);
exit(1);
}
/* Create Forms API context */
fprintf(stderr, "1");
ctx_attr.mask_d2fctxa = (ub4)0;
fprintf(stderr, "2");
if ( d2fctxcr_Create(&ctx, &ctx_attr) != D2FS_SUCCESS )
{
fprintf(stderr, "Error creating Forms API context %sn", argv[[1]]);
exit(1);
}
/* Load the form module into memory */
if ( d2ffmdld_Load(ctx, &form, argv[[1]], FALSE) != D2FS_SUCCESS )
{
fprintf(stderr, "Failed to load form module: %sn", argv[[1]]);
exit(1);
}
/* Get the name of the form module */
if ( d2ffmdg_name(ctx, form, &form_name) != D2FS_SUCCESS )
{
fprintf(stderr, "Error getting the name of the form modulen");
}
else
{
/* Print the name of the form, then free it */
printf ("The name of the form is %sn", form_name);
free(form_name);
}
/* Destroy the in-memory form */
if ( d2ffmdde_Destroy(ctx, form) != D2FS_SUCCESS )
{
fprintf(stderr, "Error destroying form modulen");
}
/* Close the API and destroy context */
d2fctxde_Destroy(ctx);
return 0;
}
When I execute the above program, it fails in the first API d2fctxcr_Create. Could anyone of you help me why is it failing?
Thanks
Regards
Raj
|
|
|
Re: Forms API [message #84980 is a reply to message #84842] |
Mon, 17 May 2004 05:21 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Petr
Messages: 1 Registered: May 2004
|
Junior Member |
|
|
Have you properly installed Oracle client software on machine you execute program? I am using MinGW - no problem.
|
|
|
Re: Forms API [message #84984 is a reply to message #84980] |
Mon, 17 May 2004 20:36 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Raj
Messages: 411 Registered: November 1998
|
Senior Member |
|
|
Hi Petr,
Thanks a lot for your response. I think I have installed it properly because I am able to work in SQL plus and forms 6i.
Thanks again
Regards
Raj
|
|
|
Re: Forms API [message #85471 is a reply to message #84842] |
Wed, 30 June 2004 04:11 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
R Misra
Messages: 2 Registered: June 2004
|
Junior Member |
|
|
Hi Raj
I have the exact same problem as you have mentioned above.
Kindly let me know if you have arrived at any solution for the same.
|
|
|