Home » Developer & Programmer » Forms » Client_OLE2 very slow (Oracle 10G, windows XP)
Client_OLE2 very slow [message #486571] Thu, 16 December 2010 18:20 Go to next message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

Hi Guys,

I'm using webutil Client_OLE2 to read excel file with 55 columns and less than a thousand records. The problem is it took a minute for every row. Anyone here knows how to deal with this performance problem?
Re: Client_OLE2 very slow [message #486870 is a reply to message #486571] Tue, 21 December 2010 00:58 Go to previous messageGo to next message
mshrkshl
Messages: 247
Registered: September 2006
Location: New Delhi
Senior Member
upload your file to application server and use OLE2 only.
Re: Client_OLE2 very slow [message #486961 is a reply to message #486870] Tue, 21 December 2010 10:29 Go to previous messageGo to next message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

Thanks for your reply.

But, is there a way to upload excel to application server via forms? If that is possible, where should be the proper directory?
Re: Client_OLE2 very slow [message #487061 is a reply to message #486961] Wed, 22 December 2010 05:33 Go to previous messageGo to next message
mshrkshl
Messages: 247
Registered: September 2006
Location: New Delhi
Senior Member
use webutil client_to_as builtin

path will be configured in webutil.cfg

[Updated on: Wed, 22 December 2010 05:34]

Report message to a moderator

Re: Client_OLE2 very slow [message #487123 is a reply to message #487061] Wed, 22 December 2010 21:27 Go to previous message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

Got a piece of code from web and do a little modification BUT it gives me error.
2010-Dec-23 11:22:29.114 ERROR>WUF-105 [FileFunctions.copyFile()] Unable to open file /forms/doc/myfile.xls for writing

2010-Dec-23 11:22:32.630 ERROR>WUT-132 [WEBUTIL_FILE_TRANSFER.uploadInt] Invalid Application Server file name /forms/doc/myfile.xls. Cannot create application server file

Declare
l_filename varchar2(200);
server_file varchar2(150);
v_file varchar2(30) := null;
blnRet BOOLEAN;

begin

	l_filename := WEBUTIL_FILE.FILE_OPEN_DIALOG('c:\','','|Excel 2003(*.xls)|*.xls|Excel 2007(*.xlsx)|*.xlsx|','Upload Excel File');

	v_file := substr(l_filename, instr(l_filename, '\', -1) + 1); 
	server_file := '/forms/doc' || '/' || v_file;
	--server_file := 'C:\Trans' || '/' || v_file;
	blnRet := Webutil_File.Copy_File(l_filename, server_file);

	if blnRet then 
		 message('file copied');
	else
		 blnRet := WEBUTIL_FILE_TRANSFER.Client_To_AS(l_filename, server_file);
		if blnRet then 
			 message('file copied by transfer'); 
		else
			 message('file not copied by transfer');
		end if;
	end if;
	
	EXCEPTION
	WHEN OTHERS THEN
		message('Error Loading File');

END;




Mt webutil.cfg has this
#NOTE: By default the file transfer is disabled as a security measure
transfer.database.enabled=TRUE
transfer.appsrv.enabled=TRUE
transfer.appsrv.workAreaRoot=c:\temp
transfer.appsrv.accessControl=TRUE
#List transfer.appsrv.read.<n> directories
transfer.appsrv.read.1=c:\temp
#List transfer.appsrv.write.<n> directories
transfer.appsrv.write.1=/forms/doc --modified
--added this one
transfer.appsrv.write.2=c:\temp
Previous Topic: Prevent user from navigating to another webpage by displaying a dialog box
Next Topic: Oracle 11g Architecture
Goto Forum:
  


Current Time: Thu Sep 19 00:24:57 CDT 2024