Get_File_Name Usage in Oracle Forms 6i

Get_File_Name is built-in function  of Oracle Forms 6i, used to get the file name with address by browsing the file. You can browse a specific extension name file or with multiple extensions using wild cards.
 
In this example I am showing three different usage of Get_File_Name function, one is given for to get any  Csv file  name into a display field, second is given to  read image files  into an image item and third is for  sound item .
 
Below is the screen shot for this example:
 
browse.png
 
You can also download this form from the following link: GetFileName.fmb

Write the following code on When-Button-Pressed trigger for Browse CSV Files button:
 
declare
filename varchar2(500);
begin
filename := GET_FILE_NAME(File_Filter=> 'CSV Files
(*.Csv)|*.Csv|');

:block2.txtfile := filename;

end;

Write the following code on When-Button-Pressed trigger for Upload Image button:
 
declare
filename varchar2(500);
begin
filename := GET_FILE_NAME(File_Filter=> 'Jpg Files
(*.jpg)|*.jpg|Gif Files (*.gif)|*.gif|All Files (*.*)|*.*|');

READ_IMAGE_FILE(filename, 'JPEG', 'block2.image9');
end;


Write the following code on When-Button-Pressed trigger for Browse Wave button:
 
declare
filename varchar2(500);
begin
filename := GET_FILE_NAME(File_Filter=> 'Wav Files
(*.wav)|*.wav|All Files (*.*)|*.*|');

READ_sound_FILE(filename, 'wave', 'block2.sound_item11');
play_sound('block2.sound_item11');
end;
Like us to get notifications for free source code in future, thanks.

转载于:https://www.cnblogs.com/quanweiru/p/6220206.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值