Solved

create browser button?

Posted on 2001-08-30
9
775 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
File generation using utl_file 4 45
data lookup in Oracle - need suggestions 55 101
Processing of multiple cursor 6 35
Oracle SQL 6 47
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 …
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

930 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