Home » Developer & Programmer » Forms » How to passing Records type in ORA_FFI.register_parameter ?
How to passing Records type in ORA_FFI.register_parameter ? [message #196840] Sun, 08 October 2006 03:49 Go to next message
robert7788
Messages: 6
Registered: October 2006
Junior Member
I would like passing Records Type to use ORA_FFI.register_parameter in Forms 6i.

However I have no idea about how it works.

Can someone please give some pointers as to how I can do it ?.


[Updated on: Sun, 08 October 2006 03:51]

Report message to a moderator

Re: How to passing Records type in ORA_FFI.register_parameter ? [message #197076 is a reply to message #196840] Mon, 09 October 2006 21:15 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Have you searched this forum for 'ora_ffi'? Have you read the documentation on the Oracle website? Have you googled 'ora_ffi'?

When you have done this and have a specific problem, get back to us.

David
Re: How to passing Records type in ORA_FFI.register_parameter ? [message #197090 is a reply to message #197076] Tue, 10 October 2006 00:09 Go to previous messageGo to next message
robert7788
Messages: 6
Registered: October 2006
Junior Member
I have readed the documentation for 73152_01 ,but i don't know
Record type register_parameter in ora_ffi package, ora_ffi.register_parameter only can follow type:

Ora_Ffi.Register_Parameter
Description Registers the argument type of the current argument of the specified
foreign function.
Syntax
PROCEDURE Ora_Ffi.Register_Parameter
(funcHandle funcHandleType,
cargtype PLS_INTEGER);
PROCEDURE Ora_Ffi.Register_Parameter
(funcHandle funcHandleType,
cargtype PLS_INTEGER,
plsargtype PLS_INTEGER);
Parameters
funcHandle A function handle returned by
Ora_Ffi.Register_Function or
Ora_Ffi.Find_Function.
cargtype The C datatype of the current argument to the
C foreign function being called. The value of
this argument may be one of the following
packaged constants:
C_CHAR Means char
C_CHAR_PTR Means char *
C_DOUBLE Means double
C_DOUBLE_PTR Means double *
C_FLOAT Means float
C_FLOAT_PTR Means float *
C_INT Means int
C_INT_PTR Means int *
C_LONG Means long
C_LONG_PTR Means long *
C_SHORT Means short
C_SHORT_PTR Means short *
C_VOID_PTR Means void *
plsargtype The corresponding PL/SQL argument type
(optional).
Re: How to passing Records type in ORA_FFI.register_parameter ? [message #197103 is a reply to message #197090] Tue, 10 October 2006 01:43 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
A reasonably good example for 'ora_ffi' can be found at http://www.oracle.com/technology/products/forms/htdocs/webutil/howto_ffi.html

The current (10g) documentation points to http://www.oracle.com/webapps/online-help/reports/10.1.2/state/content/navId.3/navSetId._/vtTopicFile.htmlhelp_rwbuild_hs%7Crwrefex%7 Cplsql%7Cbuiltins%7Coraffi%7Cpkg_offrp~htm/ and looks very similar to that which you have posted.

What is a 'void' type? Is that useable for you?

David
Re: How to passing Records type in ORA_FFI.register_parameter ? [message #197191 is a reply to message #197103] Tue, 10 October 2006 08:04 Go to previous messageGo to next message
robert7788
Messages: 6
Registered: October 2006
Junior Member
i im working in ora_ffi, but dont't register record type ,i have spended a lot of time (15days),i want to call crystal report in form6i and use the foreign function of DLL,the name of DLL is CRPE32.DLL ,the function name is PELogOnServer ,do you point me how to use it ?

Below crystal report sdk documentation (Legacy.chm):

PELogOnServer
Use PELogOnServer to logon to the specified server.

C Syntax
BOOL CRPE_API PELogOnServer (
const char FAR *dllName,
PELogOnInfo FAR *logOnInfo );

Parameters
dllName
Specifies a pointer to the name of the Crystal Reports DLL for the server or password protected non-SQL table to which you want to logon. (for example, "crdb_odbc.dll"). Note that the dllName must be enclosed in quotes. DLL names have the following naming convention: crdb_*.dll for standard (non-SQL) databases and for SQL/ODBC databases.

logOnInfo
Specifies a pointer to PELogOnInfo.



Returns
TRUE if the call is successful.
FALSE if the call fails.


PELogOnInfo
PELogOnInfo contains log on information that is used by PEGetNthTableLogOnInfo, PESetNthTableLogOnInfo, PELogOnServer, and PELogOffServer for logging on and off SQL and password-protected non-SQL databases.

C Syntax
typedef struct PELogOnInfo {
WORD StructSize;
char ServerName [PE_SERVERNAME_LEN];
char DatabaseName [PE_DATABASENAME_LEN];
char UserID [PE_USERID_LEN];
char Password [PE_PASSWORD_LEN];
} PELogOnInfo;

Members
StructSize
Specifies the size of the PELogOnInfo structure. Initialize this member to PE_SIZEOF_LOGON_INFO.

ServerName
Specifies the logon name for the server (of length PE_SERVERNAME_LEN = 128, NULL-terminated) used to create the report. See Remarks below.

DatabaseName
Specifies the database logon name (of length PE_DATABASENAME_LEN = 128, NULL-terminated) for the database used to create the report. See Remarks below.

UserID
Specifies the user I.D (of length PE_USERID_LEN = 128, NULL-terminated) necessary to log on to the server. See Remarks below.

Password
Specifies the password (of length PE_PASSWORD_LEN = 128, NULL-terminated) necessary to log on to the server. See Remarks below.


Re: How to passing Records type in ORA_FFI.register_parameter ? [message #197274 is a reply to message #197191] Tue, 10 October 2006 19:15 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Have a look at the sites referred to by the links in http://www.orafaq.com/forum/m/151570/67467/?srch=crystal#msg_151570

David
Re: How to passing Records type in ORA_FFI.register_parameter ? [message #197277 is a reply to message #197274] Tue, 10 October 2006 20:08 Go to previous messageGo to next message
robert7788
Messages: 6
Registered: October 2006
Junior Member
i aleady down file below file on SEP and i am working, the file is print crystal report(use function PEprintreport) ,PEprintreport not struct parameter in c (similar type record in pl/sql ) , i don't know passing type register_parameter record in ora_ffi packge .

http://support.businessobjects.com/communityCS/FilesAndUpdates/oraforms.zip.asp

[Updated on: Tue, 10 October 2006 20:10]

Report message to a moderator

Re: How to passing Records type in ORA_FFI.register_parameter ? [message #197341 is a reply to message #197277] Wed, 11 October 2006 00:34 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Have a look at this post http://forums.oracle.com/forums/message.jspa?messageID=1151428 and http://www.amazon.com/b?ie=UTF8&node=588496 (a book - search for 'Crystal') and http://www.oreilly.com/catalog/oraclepo/inx.html (another book - search for 'Crystal') and http://forums.oracle.com/forums/thread.jspa?messageID=1324480 (email them and see if they can help).

David
Re: How to passing Records type in ORA_FFI.register_parameter ? [message #197595 is a reply to message #197341] Wed, 11 October 2006 23:15 Go to previous messageGo to next message
robert7788
Messages: 6
Registered: October 2006
Junior Member
up
Re: How to passing Records type in ORA_FFI.register_parameter ? [message #198327 is a reply to message #197595] Mon, 16 October 2006 11:01 Go to previous messageGo to next message
robert7788
Messages: 6
Registered: October 2006
Junior Member
i am not working ,can help me.
Re: How to passing Records type in ORA_FFI.register_parameter ? [message #198396 is a reply to message #198327] Tue, 17 October 2006 01:02 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
Have you checked out the links David gave you?

MHE
Re: How to passing Records type in ORA_FFI.register_parameter ? [message #198600 is a reply to message #198327] Tue, 17 October 2006 21:58 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
What is happening / not happening? Does it compile and generate? Can you get ANY ora_ffi demos to work?

Are you getting an error message? If yes, post them EXACTLY as they appear on the screen. If necessary cut and paste the screen or screens into a word document, change the 'colour depth' to 8-bit, save and attach the word document to your reply.

David
Previous Topic: "Start In" path for Builder / Runtime, need feedback ...
Next Topic: Doubt in form
Goto Forum:
  


Current Time: Wed Dec 07 08:36:55 CST 2016

Total time taken to generate the page: 0.17016 seconds