Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

create browser button?

Posted on 2001-08-30
9
Medium Priority
?
810 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
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…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
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.

783 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