Home » Developer & Programmer » Forms » WUT-113 - Too many rows error using webutil to upload doc or pdf
WUT-113 - Too many rows error using webutil to upload doc or pdf [message #458744] Tue, 01 June 2010 12:20 Go to next message
quigs
Messages: 10
Registered: October 2007
Junior Member
Hi All,

I'm new to using Webutil to upload and view files and am receiving the error msg 'WUT-113 Too many rows matched the supplied where clause'
The process works fine for uploading photos but not when I try and upload documents and pdf files.

The code example (for documents) is outlined below but think that the issue must be to do with some sort of incorrect Webutil configuration on my machine.

declare
vfilename varchar2(3000);
vboolean boolean;
begin
vfilename := client_get_file_name('c:\',file_filter => 'Document files (*.doc)|*.doc|');

vboolean := webutil_file_transfer.Client_To_DB_With_Progress
( vfilename,
'lobs_table',
'word_blob',
'blob_id = '||:blob_id,
'Progress',
'Uploading File '||vfilename,
true,
'CHECK_LOB_PROGRESS');

end;

The :blob_id column is populated on the form with the when-create-record trigger.
Why is the program at time of upload to the db saying that more than 1 row is being written to the db table?

Any assistance in this matter would be appreciated.

kind regards,

Tom
Re: WUT-113 - Too many rows error using webutil to upload doc or pdf [message #458753 is a reply to message #458744] Tue, 01 June 2010 13:57 Go to previous messageGo to next message
Littlefoot
Messages: 21549
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I don't use Webutil so - this is probably quite stupid. However: could the cause of your problems be in the asterisk wildcard (*.doc)?
Re: WUT-113 - Too many rows error using webutil to upload doc or pdf [message #458776 is a reply to message #458753] Tue, 01 June 2010 15:42 Go to previous messageGo to next message
gregor
Messages: 86
Registered: March 2010
Location: Germany
Member
Hi Tom,
I Changed your code as an idea for a solution: not tested/runable , beccause I don't know your target Table.
NOTE 1: The Client_To_DB function use an UPDATE statement to store the document in an existing BLOB column.
declare
vfilename varchar2(3000);
vboolean boolean;
x pls_integer
begin
vfilename := client_get_file_name('c:\',file_filter => 'Document files (*.doc)|*.doc|');

-- Because NOTE 1: 
select seqX.nextval into x from dual:
Insert Into lobs_table (blob_id,      filedescription,          word_blob)
                    Values ( seqX.nextval, vfilename, null);
   :system.message_level := 5;
   post;
   :system.message_level := 0;
  
vboolean := webutil_file_transfer.Client_To_DB_with_progress
                                    (clientFile      => vfilename
                                    ,tableName       => 'lobs_table'
                                    ,columnName      => 'word_blob'
                                    ,whereClause     => 'blob_id = '||x
                                    ,progressTitle   => ' aloah MyprogressTitle'
                                    ,progressSubTitle=> 'Myprogress Subitle'
                                    ,asynchronous    => true
                                    ,callbackTrigger => 'CHECK_LOB_PROGRESS');
                                    ); end;





Re: WUT-113 - Too many rows error using webutil to upload doc or pdf [message #458777 is a reply to message #458776] Tue, 01 June 2010 15:59 Go to previous messageGo to next message
quigs
Messages: 10
Registered: October 2007
Junior Member
Hi Gregor,

Many thanks for your detailed reply and yes I've recently found out about it actually being an UPDATE statement so it expects the relevant blob_id value to be in the db (when it refers to blob_id = '||:blob_id).
This is true due to the insert statement just before the call to
Client_To_Db... as you have outlined.

The base example that I had been given didn't have any reference to the insert statement at all so I was wondering why the Client_To_Db process wasn't inserting the record.

It's still strange why we get the 'too many rows' error if the value that I have generated in the form isn't in the db and there are currently no rows in the lobs_table table.

Thanks again for your time.

Kind regards,

Tom
Re: WUT-113 - Too many rows error using webutil to upload doc or pdf [message #470033 is a reply to message #458777] Sat, 07 August 2010 03:54 Go to previous messageGo to next message
vbhanumanth
Messages: 21
Registered: July 2010
Location: chennai
Junior Member


I am getting same error.I m new in oracle forms.kindly send the solutuion


Thanks and Regards

hanu
Re: WUT-113 - Too many rows error using webutil to upload doc or pdf [message #662766 is a reply to message #458744] Thu, 11 May 2017 13:19 Go to previous message
danielalvesaraujoo
Messages: 1
Registered: May 2017
Junior Member
Comigo estava acontecendo o mesmo problema.
Verifique se quando você entra na tela, se você pesquisar algum registro primeiro, e depois adicionar o novo registro sem sair da tela, deve resolver.
No meu caso adicionei no WHEN-NEW-FORM-INSTANCE o seguinte código:

set_block_property('BLOCK_EXEMPLO',default_where,'WHERE ID= -14646646');--inventei uma ID que não existe
go_block('BLOCK_EXEMPLO');
execute_query;
set_block_property('BLOCK_EXEMPLO',default_where,'');

e resolveu o problema.

-------------------------------------

The problem was with me.
Make sure that when you enter the screen, if you search for a record first, and then add the new record without leaving the screen, you must resolve.
In my case I added the following code in WHEN-NEW-FORM-INSTANCE:

Set_block_property ('BLOCK_EXEMPLO', default_where, 'WHERE ID = -14646646'); --I invented an ID that does not exist
Go_block ('BLOCK_EXEMPLO');
Execute_query;
Set_block_property ('BLOCK_EXEMPLO', default_where, '');

And solved the problem.
Previous Topic: frm-40735 error occur with ora-01403
Next Topic: Pass encoded Parameter
Goto Forum:
  


Current Time: Fri Apr 10 05:31:25 CDT 2020