Solved

create browser button?

Posted on 2001-08-30
9
793 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 

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
 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that useā€¦
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
Suggested Courses

623 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