Solved

create browser button?

Posted on 2001-08-30
9
773 Views
Last Modified: 2007-11-27
Please tell me how to create a button in forms that has to be used as browser as in windows?
To select the file name from the system.

0
Comment
Question by:Hareesh
9 Comments
 
LVL 3

Expert Comment

by:UsamaMunir
ID: 6439981
DECLARE
 v_filename VARCHAR2(255);
BEGIN
 v_filename := GET_FILE_NAME ('C:\', NULL, 'Bitmap (*.bmp)|*.bmp|');
end;

Use GET_FILE_NAME built in, furtur details will be in the help.

Regards
U
0
 

Author Comment

by:Hareesh
ID: 6440525
Actaully I am using forms 4.5 version.
There I haven,t get GET_FILE_NAME built in.
So kindly advice for the next step.

Regards
Hareesh
0
 
LVL 5

Expert Comment

by:FBIAGENT
ID: 6441795
HAREESH,

In your ORACLE_HOME directory, look for a library file called D2kwfile.pll
It should be under directory $ORACLE_HOME$\Forms45\Plsqllib

Attach this library in your form.  Add the following code in the WHEN-BUTTON-PRESSED trigger.
You can read the in-line document in the D2kwfile.pll for more detail.

Good luck

declare
   v_import_file                   varchar2(255);
begin
   -- show the Windows Open File dialog
   v_import_file := win_api_dialog.open_file(
                              'Open File'                               -- Window Title
                             ,'$WINDIR$'                                -- StartDirectory
                             ,'Microsoft Project Files(*.mp*)|*.mp*|'|| -- FileFilter
                              'All Files(*.*)|*.*|'
                             ,TRUE                                      -- Modal
                             ,WIN_API.OFN_FLAG_DEFAULT                  -- AdvancedFlags
                             ,FALSE                                     -- RaiseException
                             );

   -- check to see if the user selects a project schedule file to import
   if v_import_file is null then
      null;

   -- the user selects a MS Project file;
   -- v_import_file contains the name (including path) of the MS Project file
   else
      -- put logic to process the file here
      ...

   end if;
end;
0
 

Author Comment

by:Hareesh
ID: 6485269
I am using forms 4.5 version.
There I haven,t get open_file built in D2kwfile.pll lib.
So Please advice me for the next step.

Regards
Hareesh
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 5

Expert Comment

by:FBIAGENT
ID: 6488108
HAREESH,

Were you able to find the library file D2KWFILE.PLL?
It should be under directory $ORACLE_HOME$\Forms45\Plsqllib.  You must attach this library in your form.
Did you do all that?

Is this your form version?  Forms [32 Bit] Version 4.5.10.6.0 (Production)
You can see what form version you're using by selecting Help | About Forms... in your Form Designer

Good luck
0
 

Author Comment

by:Hareesh
ID: 6489314
I am having Forms [32 Bit] Version 4.5.7.0.10 (Production).
I have got D2kwfile.pll lib in there.
I have attached the library.
In thatlibrary  I haven,t got open_file built in .
So Please advice me for the next step.

Regards
Hareesh
0
 
LVL 5

Accepted Solution

by:
FBIAGENT earned 50 total points
ID: 6491408
HAREESH,

Did you try to compile the following?  Don't forget that it's WIN_API_DIALOG.OPEN_FILE, not just OPEN_FILE

declare
                       v_import_file                   varchar2(255);
                     begin
                       -- show the Windows Open File dialog
                       v_import_file := win_api_dialog.open_file(
                                                  'Open File'                               -- Window Title
                                                 ,'$WINDIR$'                                -- StartDirectory
                                                 ,'Microsoft Project Files(*.mp*)|*.mp*|'|| -- FileFilter
                                                  'All Files(*.*)|*.*|'
                                                 ,TRUE                                      -- Modal
                                                 ,WIN_API.OFN_FLAG_DEFAULT                  -- AdvancedFlags
                                                 ,FALSE                                     -- RaiseException
                                                 );

                       -- check to see if the user selects a project schedule file to import
                       if v_import_file is null then
                          null;

                       -- the user selects a MS Project file;
                       -- v_import_file contains the name (including path) of the MS Project file
                       else
                          -- put logic to process the file here
                          ...

                       end if;
                     end;
0
 
LVL 6

Expert Comment

by:Mindphaser
ID: 7042909
Please update and finalize this old, open question. Please:

1) Award points ... if you need Moderator assistance to split points, comment here with details please or advise us in Community Support with a zero point question and this question link.
2) Ask us to delete it if it has no value to you or others
3) Ask for a refund so that we can move it to our PAQ at zero points if it did not help you but may help others.

EXPERT INPUT WITH CLOSING RECOMMENDATIONS IS APPRECIATED IF ASKER DOES NOT RESPOND.

Thanks,

** Mindphaser - Community Support Moderator **

P.S.  Click your Member Profile, choose View Question History to go through all your open and locked questions to update them.
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 7058219
Zero response from anyone, finalized.
Moondancer - EE Moderator
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now