Dialog Box not open with GET_FILE_NAME Oracle Form

2019-07-14 00:40发布

问题:

I have oracle database 11g with oracle forms and reports 11g. I created browse button to open CSV File from computer or laptop directory

I am using this code on trigger when-button-press:

declare
 filename varchar2(500);
begin
 filename := GET_FILE_NAME(File_Filter=> ‘CSV Files
 (*.Csv)|*.Csv|’);
:block2.FILE_NAME:= filename;

end;

When I pressed the button then did not open dialog box.

回答1:

Your code works on Forms 6i provided you have properly attached the .olb and .pll files for webutil, but for Oracle Fusion Middleware 11g the method GET_FILE_NAME should be replaced with CLIENT_GET_FILE_NAME to search in your local file system instead of application server as below :

:block2.FILE_NAME := CLIENT_GET_FILE_NAME(File_Filter=> 'CSV Files (*.Csv)|*.Csv|');