Home » Developer & Programmer » Forms » frm-10043 cannot open file !!! (software : Forms [32 Bit] Version 9.0.2.9.0 , oracle JInitiator: 1.3.1.9, WebUtil 1.0.2(Beta), window , IE 8)
frm-10043 cannot open file !!! [message #608123] Sun, 16 February 2014 10:55 Go to next message
meteo
Messages: 89
Registered: April 2010
Location: beirut
Member
i try to read metarfile.xls excel file found in 'C:\Climate_File' and fetch it's content to my form readwrite_xl.fmb specifically in the block item (:BIN_DOCS.desc_mv_dtl)
when I run my form in debug mode specifically at the instruction:
"application := OLE2.CREATE_OBJ('Excel.Application');" the cursor dos not execute it well
always an error loaded message : frm-10043 cannot open file !!!
i also checked the java consol i have got the following exception

................
Exception occurred during event dispatching:
java.lang.ExceptionInInitializerError: java.security.AccessControlException: access denied (java.lang.RuntimePermission loadLibrary.jacob)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkLink(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at com.jacob.com.Dispatch.<clinit>(Dispatch.java:537)
at oracle.forms.webutil.ole.OleFunctions.create_obj(OleFunctions.java:513)
at oracle.forms.webutil.ole.OleFunctions.getProperty(OleFunctions.java:218)
....................
is there any suggestion for such error ?
thank you

this is a part of my procedure :
......
BEGIN
-- Get the name of the file to open
v_fName := 'C:\Climate_File\ metarfile.xls';
-- My Way: Use a File Open Dialog to let the user select the file.
v_fName := WebUtil_File.File_Open_Dialog( directory_name => 'C:\Climate_File\',File_Filter => null,Title => 'Select Client filename to Open.');
-- Make sure the user selected a file
IF ( v_fName IS NOT NULL ) THEN
-- The following sets up communication with the excel spreadsheet
-- --------------------------------------------------------------
-- Open the OLE application
application := Client_OLE2.create_obj('Excel.Application'); -- always getting the mentioned error: frm-10043 cannot open file!!!

-- Keep the application hidden
Client_OLE2.set_property(application,'Visible','false');
workbooks := Client_OLE2.Get_Obj_Property(application, 'Workbooks');
args := Client_OLE2.CREATE_ARGLIST;
............
Re: frm-10043 cannot open file !!! [message #608132 is a reply to message #608123] Sun, 16 February 2014 16:10 Go to previous messageGo to next message
mughals_king
Messages: 392
Registered: January 2012
Location: pakistan
Senior Member
Some suggestions may be could help you.

*.FMB file would normally only be opened by a developer using the Forms Designer tool not as a user in a run-time situation is that what happened to you? Are you a developer and your *.FMB file is locked? Or was this really a *.FMX file that was opened by you as a user in a run-time environment?

You may need to have a DBA kill your disconnected database session and/or you may need to have a network administrator unlock the the file if it was on a shared network disk.

2ndly i think the form has got corrupted while the shutdown occured hope you have a backup of the *.fmb file you can use If not you may have to create it from scratch.

One other possibility is to try to convert your *.fmb to a *.fmt file then covert that back to a *.fmb file If you try that approach make sure you rename the *.fmt file so when you convert it back to a *.fmb you don't over-write the one you have now just in case this conversion makes things worse.


Regard
Mughal
Re: frm-10043 cannot open file !!! [message #608133 is a reply to message #608132] Sun, 16 February 2014 16:15 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I'm afraid that you have misread the question, or didn't understand it at all. It is not a FMB file that can not be opened, but an Excel file.
Re: frm-10043 cannot open file !!! [message #608144 is a reply to message #608133] Mon, 17 February 2014 00:30 Go to previous message
meteo
Messages: 89
Registered: April 2010
Location: beirut
Member
yes this is exactly my problem Mr I cannot open xls .file from my fmx form.

in detail
I already create an excel file(metar.xls) with the structure :
pid name feature
1 mercury hot
2 earth life
..

I create a form metar.fmb form with same metar.xls structure that contains
block planet with:
-- three text items: pid , name, feature
-- button load under which I write a trigger code that read the content from metar.xls and fetch them to metar.fmx; this is a part of it:

Declare
application Client_OLE2.Obj_Type;
workbooks Client_OLE2.Obj_Type;
workbook Client_OLE2.Obj_Type;
worksheets Client_OLE2.Obj_Type;
worksheet Client_OLE2.Obj_Type;
worksheet2 Client_OLE2.Obj_Type;
cell Client_OLE2.OBJ_TYPE;
.....
BEGIN
v_fName := 'C:\Climate_File\metar.xls';
v_fName := WebUtil_File.File_Open_Dialog( directory_name => 'C:\Climate_File\',File_Filter => null ,Title => 'Select Client filename to Open.' );

IF ( v_fName IS NOT NULL ) THEN

application := Client_OLE2.create_obj('Excel.Application');where i try to select/open metar.xls from a window; always an error loaded
message : frm-10043 cannot open file !!!
.....


also i cheked java consol i am getting the followin exception:
java.lang.ExceptionInInitializerError: java.security.AccessControlException: access denied (java.lang.RuntimePermission loadLibrary.jacob)
at java.security.AccessControlContext.checkPermission(Unknown Source)
......
at com.jacob.com.Dispatch.<clinit>(Dispatch.java:537)
at oracle.forms.webutil.ole.OleFunctions.create_obj(OleFunctions.java:513)
at oracle.forms.webutil.ole.OleFunctions.getProperty(OleFunctions.java:218)

i would like to recall about the software that i use: Forms [32 Bit] Version 9.0.2.9.0 , oracle JInitiator: 1.3.1.9, WebUtil 1.0.2(Beta), window , IE 8.

May this code does not work with my version software?is there any suggestion about this error? your help is highly appreciated Mr.
thank you.
Previous Topic: Oracle.forms.webutil.file.fileFunctions bean not found
Next Topic: How to use data block and non database item checkbox together
Goto Forum:
  


Current Time: Thu Apr 25 21:48:01 CDT 2024