Validation problem in Non-dataBase block [message #216566] |
Mon, 29 January 2007 07:47 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
|
Hello all,
I have a non database block and i want to insert the data in a table.....
So i pick the values in variables and issue a simple insert statement....... it is working fine.........
But when i want to validate any item with table data ,it is failed.......
I am using WHEN-VALIDATE-ITEM trigger and i want if user enter the such name which is already exits then it should not move to another field..
when i use GO_ITEM Built-In for the navigation purpose i m failed...
It give message that Illegile procedure in this trigger.....
Here is the code......
declare
x varchar2(2);
al_id alert;
err_txt varchar2(80);
al_button number;
begin
al_id := find_alert('ALERT');
select 1 into x from cust_master where first_name= :OPEN_ACCT.FNAME;
if x = '1' then
err_txt := 'Name is already Exists. Please Enter Another Name :-';
set_alert_property(al_id,alert_message_text,err_txt);
al_button := show_alert(al_id);
go_item('FNAME');
--clear_item;
end if;
end;
|
|
|
|
Re: Validation problem in Non-dataBase block [message #216687 is a reply to message #216609] |
Mon, 29 January 2007 22:30 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
|
thanks friend for ur reply..
But i m using a sequence to generate unique Account no.
when any user want to inset the record.....
So that in Insert option user enter all the info ...
I retrived account no from the table on the base of first name which is unique......
Do u another better solution.......
Regards
Shakti
|
|
|
|
Re: Validation problem in Non-dataBase block [message #216927 is a reply to message #216693] |
Tue, 30 January 2007 22:24 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
|
My cursor is not going to specific field and it does not validate the field...
But when i write this code on WHEN-BUTTON-PRESSED it is working fine......
that means if i check the value when the user enter all info and then click on a push button then it is working fine....
It clears the block and go_item is working here......
|
|
|
|