Solved

create browser button?

Posted on 2001-08-30
9
790 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
Industry Leaders: 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!

 

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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Via a live example, show how to take different types of Oracle backups using RMAN.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

734 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