473,503 Members | 2,150 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

10 New Member
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 16207
Pilgrim333
127 New Member
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 Recognized Expert Top Contributor
you can always create a procedure or a function in forms builder 6i and then execute them
Nov 12 '08 #3
ghssal
10 New Member
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 New Member
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 New Member
Hi,

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

Pilgim.
Nov 12 '08 #6
amitpatel66
2,367 Recognized Expert Top Contributor
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
3983
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
8002
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
1548
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
7065
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
5511
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
3188
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
1964
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
3324
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
3695
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
7287
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7349
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7008
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7467
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5594
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5022
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4688
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3177
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
399
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.