473,226 Members | 1,368 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,226 software developers and data experts.

how can run PL/SQL from oracle FORMS trigger or procedure/funcktion.

10
HI
how can run PL/SQL application as:

create or replace
function getChecksiffra (in_string varchar2) return number is

xSvar number := 0;
xNR number := 0;
xSumma number := 0;
xString varchar2(100) := null;
BEGIN
if in_string IS NOT NULL then xString:=replace(in_string,'-'); end if;
if substr(xString,12,1) IS NOT NULL
and substr(xString,10,1) <= '9'
and substr(xString,11,1) <= '9'
and substr(xString, 9,1) <= '9'
then
xNR := to_number(substr(xString,3,1)* 2);
if xNR>9 then xNR:=xNR-9; end if;
xSumma := xSumma + xNR;
xNR := to_number(substr(xString,5,1)* 2);
if xNR>9 then xNR:=xNR-9; end if;
xSumma := xSumma + xNR;
xNR := to_number(substr(xString,7,1)* 2);
if xNR>9 then xNR:=xNR-9; end if;
xSumma := xSumma + xNR;
xNR := to_number(substr(xString,9,1)* 2);
if xNR>9 then xNR:=xNR-9; end if;
xSumma := xSumma + xNR;
xNR := to_number(substr(xString,11,1)* 2);
if xNR>9 then xNR:=xNR-9; end if;
xSumma := xSumma + xNR;
xNR := to_number(substr(xString,4,1));
xSumma := xSumma + xNR;
xNR := to_number(substr(xString,6,1));
xSumma := xSumma + xNR;
xNR := to_number(substr(xString,8,1));
xSumma := xSumma + xNR;
xNR := to_number(substr(xString,10,1));
xSumma := xSumma + xNR;
if xSumma between 61 and 70 then xSvar:=70-xSumma; end if;
if xSumma between 51 and 60 then xSvar:=60-xSumma; end if;
if xSumma between 41 and 50 then xSvar:=50-xSumma; end if;
if xSumma between 31 and 40 then xSvar:=40-xSumma; end if;
if xSumma between 21 and 30 then xSvar:=30-xSumma; end if;
if xSumma between 11 and 20 then xSvar:=20-xSumma; end if;
if xSumma between 0 and 10 then xSvar:=10-xSumma; end if;
end if;
return( xSvar );
/*EXCEPTION when others then return( null );*/
end;
/

From oracle FORMS trigger or procedure/funcktion.
i check if the numeral which i insert to field is correct.

Thanks
Nov 11 '08 #1
6 16192
Pilgrim333
127 100+
Hi,

What is your problem? You want to call this function from a form, or the function is giving you a wrong result? If it is the latter, then please describe what the function should do.

If it is the first, then you have 2 options, either put the code in the form, or put the function in a package, make a role for the form and give the role execute rights on the package, and then you can call the function from your form.

Pilgrim.
Nov 11 '08 #2
amitpatel66
2,367 Expert 2GB
you can always create a procedure or a function in forms builder 6i and then execute them
Nov 12 '08 #3
ghssal
10
HI!

I create a function in forms under program units, but the function is giving me no result!

The funcktion have to check if the insert numeral to field is correct.

shall i write any thing in items triggers?
Nov 12 '08 #4
ghssal
10
Hi,

What is your problem? You want to call this function from a form, or the function is giving you a wrong result? If it is the latter, then please describe what the function should do.

If it is the first, then you have 2 options, either put the code in the form, or put the function in a package, make a role for the form and give the role execute rights on the package, and then you can call the function from your form.

Pilgrim.
I create a function in forms under program units, but the function is giving me no result!

The funcktion have to check if the insert numeral to field is correct.

shall i write any thing in items triggers?
Nov 12 '08 #5
Pilgrim333
127 100+
Hi,

Where/when do you do the call to the function?

Pilgim.
Nov 12 '08 #6
amitpatel66
2,367 Expert 2GB
I create a function in forms under program units, but the function is giving me no result!

The funcktion have to check if the insert numeral to field is correct.

shall i write any thing in items triggers?
Hmm ok so from where are you calling this function?


1. Make sure your function is perfectly compiled in forms builder 6.0 without any errors.
2. Try calling that function just for testing and print few dummy data on screen to check the flow
3. Then fit in this function from where you need to actually call and trigger that event (Say button click etc) to check if the function executes correctly


post back in caseof any issues
Nov 13 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Kaix | last post by:
Hello, is there a possibility to control oracle forms form a external application. I like to push a value in a text field in a oracle forms app and "press" a button in this form. Maybe i can...
1
by: MEG | last post by:
Hi, I am trying to do some authentification in a form and have run into a problem. The user types the usename/password into a couple of fields and presses the login button. The button trigger...
3
by: hitendra15 | last post by:
Can it be possible to create trigger/procedure in following case 2 server server A and server B A has db1 db1 has tblA B has db2 db2 has tblB can it be possible to create trigger on server...
0
by: anuj13singhal | last post by:
Hi, I am trying to open a word document on the client machine. the document is present on the oracle application server (on windows). For that I have created a java class file wordbean.class....
0
by: zellipa | last post by:
I am trying to imbed crystal in oracle. I got the following steps from the web. when i try to run the created from , iget the error frm-41344. Any suggestions. Regards, Zellipa STEPS TO...
0
by: faroz | last post by:
Hi everyone i have a question about updating some columns in oracle forms for e.g i have a page that show u items to buy something..firstly, customer have to enter the datas to order..after...
3
by: ghssal | last post by:
how i can select the latest order for a customer in oracle forms and save this order as a new order whith new date. i use GROUP BY customer_ID and MAX(order_date) but i get another customer_ID and...
9
by: ghssal | last post by:
HI I am using ORACLE forms and trying to insert a new order, by enter the customer_ID and i will get the latest order för this customer and save the new order with new order_date. I use this ...
1
by: eeriehunk | last post by:
Hi All, I wrote a procedure to clear all my text fields and disable all buttons in my form. And I call this procedure in a button (insert button). when I presses the insert button, after all my...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.