Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

WEBUTIL within form Problem

658605Sep 8 2008 — edited Sep 8 2008
dears,

i was design an form that read an excel sheet and upload the excel sheet contant into a table on DB, the excel sheet contain only 2 columns, the problem is when i compile the form CTRL+K there is no errors shown but when the form run i click Browes button but it give me error as below

ORA-06508 PL/SQL could not find program unit being called .

the program unit is client_get_file_name it a package within WEBUTIL attached library, the problem is the form cant call any package or anything from WEBUTIL attached library.

on the form i have 2 buttons

First Button Code: "Browes"

Declare
V_FILE VARCHAR2(2000);
BEGIN
V_FILE := client_get_file_name(NULL, NULL, NULL, NULL, open_file, TRUE);
:main_block.FNAME := V_FILE;
EXCEPTION
WHEN OTHERS THEN
my_alert('There Is Error: '||sqlerrm); -- My_alert(p_text) is program unit
RAISE FORM_TRIGGER_FAILURE;
END;

Second Button code : "Import to DB"

DECLARE
MYFILE CLIENT_TEXT_IO.FILE_TYPE;
filename varchar2(100);
temp varchar2(1000);
t1 varchar2(1000);
t2 varchar2(1000);
cust_id number;
dfrom date;
dto date;
ccode varchar2(100);
r varchar2(1000);
transfer_status boolean;

begin

filename := :main_block.fname;
MYFILE := CLIENT_TEXT_IO.FOPEN(filename, 'r');
SYNCHRONIZE;
SYNCHRONIZE;
CLIENT_TEXT_IO.get_line(MYFILE,temp);
t1:=temp;
while temp is not null loop
CLIENT_TEXT_IO.get_line(MYFILE,temp);
t1:=temp;
select substr(t1,1,instr(t1,',') -1)
into t2
from dual;
ccode:=t2;

select substr(t1,instr(t1,',') +1)
into t1
from dual;

insert into trc_upload -- table on DB
values(t2,t1);
commit;


end loop;

CLIENT_TEXT_IO.FCLOSE(MYFILE);
EXCEPTION
WHEN DDE.DDE_APP_FAILURE THEN
my_alert('WINDOWS APPLICATION CANNOT START.');

WHEN DDE.DDE_PARAM_ERR THEN
my_alert('A NULL VALUE WAS PASSED TO DDE');

WHEN DDE.DMLERR_NO_CONV_ESTABLISHED THEN
my_alert('DDE CANNOT ESTABLISH A CONVERSATION');

WHEN DDE.DMLERR_NOTPROCESSED THEN
my_alert('A TRANSACTION FAILED');
end;


so please to help me on this issue

Note:

the form deployed under UNIX on Application Server

Thanks

Murad.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 6 2008
Added on Sep 8 2008
1 comment
2,307 views