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 name into a display field, second is given to into an image item and third is for .
Below is the screen shot for this example:
You can also download this form from the following link: Write the following code on When-Button-Pressed trigger for Browse CSV Files button:
declarefilename varchar2(500);beginfilename := 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:
declarefilename varchar2(500);beginfilename := 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:
declarefilename varchar2(500);beginfilename := 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;