Home » Developer & Programmer » Forms » Open file JavaBean for Web Deployed Forms 6i and WIN_API_DIALOG.OPEN_FILE crashes IE (merged)
Open file JavaBean for Web Deployed Forms 6i and WIN_API_DIALOG.OPEN_FILE crashes IE (merged) [message #298234] Tue, 05 February 2008 07:22 Go to next message
pc131
Messages: 36
Registered: May 2006
Member
Hi All

I want to use dialog for selecting file in Fomrs 6i.

I attached d2kwutill.pll into form, i uploaded d2kwut60.dll into <ORA_HOME>/bin and coded WIN_API_DIALOG.OPEN_FILE to open file. Everything works fine on the machine I'm developing, the open file dialog works and it returns file name. But when i upload form on remote machine where i access through the web it won't work.

I uploaded d2kwutil.plx on remote machine to the directory where forms reside. This is when I attach library without storing full path of it which is in my case c:\someFormsDir - note! on remote machine Forms reside on d:\Forms, and on local machine I have only c: HDD D: is cdrom and i can't change drive letters.

I also try to upload d2kwutil.plx in c:\someFomrsDir on remote machine although forms there reside in d:\Forms, but on local machine library(and forms) reside in c:\someFormsDir.

None of two above examples work.

I upload d2kwut60.dll in <ORACLE_HOME>\bin direcotry - doesn't work. I even upload d2kwut60.dll in orahome2\bin direcory, doesn't work. On my local machine d2kwut60.dll is in ORA_HOME\bin where ifsrv60.exe can be found, the same i do on remote.

When I puch button to open dialog for choosing file Internet Explorer freezes.

Any help from experts?
Thanks
Tom
Re: WIN_API_DIALOG.OPEN_FILE crashes IE [message #298241 is a reply to message #298234] Tue, 05 February 2008 07:54 Go to previous messageGo to next message
rajy_salim
Messages: 204
Registered: January 2008
Location: Beirut - Lebanon
Senior Member
Why don't you try to use the GET_FILE_NAME function? Check it in forms help to see how you can use it.

For the DLLs, they must be registered if they aren't yet!
Re: WIN_API_DIALOG.OPEN_FILE crashes IE [message #298248 is a reply to message #298241] Tue, 05 February 2008 08:06 Go to previous messageGo to next message
pc131
Messages: 36
Registered: May 2006
Member
Got it from ORACLE Forms demos readme:

Using D2KWUTIL in Web Deployed Applications

The use of this library is not supported with Web deployed applications.

Confused

I'll try GET_FILE_NAME....
Re: WIN_API_DIALOG.OPEN_FILE crashes IE [message #298273 is a reply to message #298248] Tue, 05 February 2008 09:00 Go to previous messageGo to next message
rajy_salim
Messages: 204
Registered: January 2008
Location: Beirut - Lebanon
Senior Member
Good Idea!
You can even return a folder path, not only a file name, using GET_FILE_NAME . . .
icon13.gif  Re: WIN_API_DIALOG.OPEN_FILE crashes IE [message #298278 is a reply to message #298234] Tue, 05 February 2008 09:31 Go to previous messageGo to next message
pc131
Messages: 36
Registered: May 2006
Member
Seems like GET_FILE_NAME won't work on remote web deployed application.

This is code:

declare

file1 text_io.file_type;
filename1 varchar(256);
linebuf varchar2(100);

begin
	
filename1 := GET_FILE_NAME('%HOMEPATH%',File_Filter=> 'TXT Files (*.txt)|*.txt|');
file1 := TEXT_IO.FOPEN(filename1, 'r');
Text_IO.Get_Line(file1, linebuf);

if linebuf!='blablablablabla' then msg('line is OK!');
else msg('Line is wrong!');
end if;

TEXT_IO.FCLOSE(file1);

end;


But on web deployed app this code DOESN'T work. Any ideas, why?

Tom

======================

GET_FILE_NAME not supported on web deployed applications. Topic closed.

[Updated on: Tue, 05 February 2008 09:41]

Report message to a moderator

icon4.gif  Open file JavaBean for Web Deployed Forms 6i [message #298280 is a reply to message #298234] Tue, 05 February 2008 09:45 Go to previous messageGo to next message
pc131
Messages: 36
Registered: May 2006
Member
Hi All

After d2kwutil.pll->win_api_dialog.file_name and get_file_name failed, I need JavaBean and usage manual for opening files, since that is the only way to do it on Forms6i web deployed. I have web depolyed app and i need open file from local HDD. Do you have any working example with usage manual (for now i don't even have java IDE here)

Thanks in advance.

Tom
Re: WIN_API_DIALOG.OPEN_FILE crashes IE [message #298346 is a reply to message #298278] Tue, 05 February 2008 17:51 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Tom,

You say that "The use of this library is not supported with Web deployed applications". Please supply that reference.

The 'fmx', 'plx' and 'dll' files should be in the FORMS_PATH of your Application Server. Do not specify 'C:' or 'D:', and not '.fmx' in the calls in your form. Just specify the forms name without extension or drive or directory. The location of the form is controlled by the FORMS_PATH entry.

I am working from memory here but I think the 'dll' is downloaded from the AS to the PC the first time that it is used.

David
Re: WIN_API_DIALOG.OPEN_FILE crashes IE [message #298348 is a reply to message #298346] Tue, 05 February 2008 17:55 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Let's keep these threads together for the time being.

Have you repeated the 'File Upload' demo on http://www.oracle.com/technology/sample_code/products/forms/6idemos.html ?

David
Re: Open file JavaBean for Web Deployed Forms 6i and WIN_API_DIALOG.OPEN_FILE crashes IE (merged) [message #298484 is a reply to message #298234] Wed, 06 February 2008 03:52 Go to previous messageGo to next message
pc131
Messages: 36
Registered: May 2006
Member
Hi

Thanks for interest

Here is about d2kwutil.pll not working on Web -> HERE. I believe i saw the same in Oracle html readme to d2kwutil.pll library. It says: " Many of the functions in the library require access to Window Handles, which will not work on the Web".

About built-in GET_FILE_NAME i read on oracle forums -> HERE.

I studied http://www.oracle.com/technology/sample_code/products/forms/6idemos.html but it looks like it is for uploading(transferring) file physically onto middle-tier. I do not need neither want that. I need only to get the path to file using such "Open File Dialog" - which works fine for me either using GET_FILE_NAME and WIN_API_DIALOG.FILE_NAME but again as I stated before none of these 2 methods seem to work on deployed applications.

Seems like I'm stuck to entering path to file that has to be processed manually.....

I already managed to create disk D: and the same directory structure as on web deployed app. And I attach d2kwutil.pll library with or without saving full library path. Nothing changes. The form freezes. When I use GET_FILE_NAME nothing happens on web.

I added (since modules in thies app are called directly with full path, not registry set values) FORMS60_PATH, D2KTUIL_PATH (D2KWUTIL60_PATH in any case) to the registry, nothing helped.

Am I stuck to point file manualy in this case?

Regards
Tom
Re: Open file JavaBean for Web Deployed Forms 6i and WIN_API_DIALOG.OPEN_FILE crashes IE (merged) [message #298559 is a reply to message #298484] Wed, 06 February 2008 06:46 Go to previous messageGo to next message
pc131
Messages: 36
Registered: May 2006
Member
HI!!!!

I have coded parsing file by using TEXT_IO.GET_LINE but it seems that my remote file even can't be opened on remote server.

declare

file1 text_io.file_type;
filename1 varchar(256);
linebuf varchar2(100);

begin

file1 := TEXT_IO.FOPEN('C:\documents and settings\<my_home_dir>\details.txt', 'r');
Text_IO.Get_Line(file1, linebuf);
if linebuf!='blablablablabla' then msg('line is OK!');
else msg('Line is wrong!');
end if;
TEXT_IO.FCLOSE(file1);
end;


On local machine when i run form and enter "C:\details.txt" the file gets loaded because it gets processing, I can see messages.

When I upload form onto remote web-deployed app server, I enter into path "C:\documents and settings\<my_home_dir>:\details.txt" (I cannot write on C: directly, the files are the same, file C:\documents and settings\<my_home_dir>details.txt has all permisions to everyone) nothing happens. Does it mean text_io won't work on Fomrs6i web-deployed? How can I investigate this issue.

Thanks in advance
Tomek
Re: Open file JavaBean for Web Deployed Forms 6i and WIN_API_DIALOG.OPEN_FILE crashes IE (merged) [message #298644 is a reply to message #298559] Wed, 06 February 2008 23:20 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
When you compile your form are you using Ctrl-k (Compile) or Ctrl-shft-k (Compile All)? Always use the latter, ctrl-shft-k and then ctrl-t (Generate) before running your form.

David
Re: Open file JavaBean for Web Deployed Forms 6i and WIN_API_DIALOG.OPEN_FILE crashes IE (merged) [message #298732 is a reply to message #298644] Thu, 07 February 2008 06:31 Go to previous messageGo to next message
pc131
Messages: 36
Registered: May 2006
Member
Hi

Martin thanks for strong companion!

Off course I always compile CTRL+T and CTRL+SHIFT+K. Then deploy.

I finally found bug in my code, sorry for confusion. TEXT_IO.FOPEN and GET_LINE work. The open and read file. What's more I can read network file by entering \\shared_computer\dir\file.txt - really cool (but needs sharing directory and entering machine name etc, not all users want that). It seems to be the only way to parse file that is not on Forms App computer.

Webutil won't work with Forms Developer 6 - when i try to load webutil.pll into Forms Developer i get error dialog saying: PDE-PEP006 Encoded Program unit has unknown format. ORACLE says HERE that webutil is tested with Forms 9 and 10.

D2KWUTILL.PLL which is intented to work with Forms 6 and actually works with Forms6 (I checked file choosing dialog works) but no when deployed on Web. ORACLE SAYS:

"Using D2KWUTIL in Web Deployed Applications. The use of this library is not supported with Web deployed applications. In a web deployment scenario not all functions within D2KWUTIL will work. Any function that interacts with the User Interface (such as those in the WIN_API_DIALOG package - huh I wanted open dialog here!!!!!) will fail."

Forms6 make me feel dizzy Smile

Tom
Re: Open file JavaBean for Web Deployed Forms 6i and WIN_API_DIALOG.OPEN_FILE crashes IE (merged) [message #486815 is a reply to message #298732] Mon, 20 December 2010 07:16 Go to previous message
usman_ghani96
Messages: 4
Registered: December 2010
Junior Member
Hi Tom
I have a same problem can u tell me how can u fix this problem i m using form 6i and using built in text_io procedure to read file from client side and insert data into table i set a trigger on button and give a reference of procedure in when-button-pressed trigger i have no compilation error but when i deploy my form on a remote web-deployed app server it give error "FRM-40735 WHEN-BUTTON-PRESSED TRIGGER RAISED UNHANDLED EXCEPTION ORA-302000" i will be very thanks full to you providing a solution.

Usman
Previous Topic: Validation using A.M P.M (merged)
Next Topic: Close Java Applet WebStart Window
Goto Forum:
  


Current Time: Thu Sep 19 13:49:45 CDT 2024