Client_OLE2 very slow [message #486571] |
Thu, 16 December 2010 18:20 |
|
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 #487123 is a reply to message #487061] |
Wed, 22 December 2010 21:27 |
|
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
|
|
|