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:=replac e(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(subst r(xString,3,1)* 2);
if xNR>9 then xNR:=xNR-9; end if;
xSumma := xSumma + xNR;
xNR := to_number(subst r(xString,5,1)* 2);
if xNR>9 then xNR:=xNR-9; end if;
xSumma := xSumma + xNR;
xNR := to_number(subst r(xString,7,1)* 2);
if xNR>9 then xNR:=xNR-9; end if;
xSumma := xSumma + xNR;
xNR := to_number(subst r(xString,9,1)* 2);
if xNR>9 then xNR:=xNR-9; end if;
xSumma := xSumma + xNR;
xNR := to_number(subst r(xString,11,1) * 2);
if xNR>9 then xNR:=xNR-9; end if;
xSumma := xSumma + xNR;
xNR := to_number(subst r(xString,4,1)) ;
xSumma := xSumma + xNR;
xNR := to_number(subst r(xString,6,1)) ;
xSumma := xSumma + xNR;
xNR := to_number(subst r(xString,8,1)) ;
xSumma := xSumma + xNR;
xNR := to_number(subst r(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
6 16220
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.
you can always create a procedure or a function in forms builder 6i and then execute them
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?
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?
Hi,
Where/when do you do the call to the function?
Pilgim.
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
Sign in to post your reply or Sign up for a free account.
Similar topics |
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 use OLE like EXTRA Attchmate.
Thanks.
Kai
|
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 PL/SQL looks like this :
DECLARE
uservar VARCHAR2(15) := '';
|
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 A.db1.tblA as
|
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. (Source code below)
package oracle.forms.demos.ole;
import com.jacob.activeX.ActiveXComponent;
import java.awt.Panel;
import com.jacob.com.*;
|
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 display the Crystal Report in Oracle Forms 6i:
| |
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 entering all datas,customer have to push the button that name is Pay Now..i wrote codes under this button..when u push the button,firstly my project controls...
|
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 order who share the 'order_date' och inserted before a pressing issue.
the Trigger as
select .....
from customer_order, (
select...
|
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 Trigger
select .....
from customer_order, (
select customer_ID AS B, MAX(order_date) AS S
from customer_order
|
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 button operations, all the text fields get cleared and all my buttons get disabled, except my insert button. I do have code to disable this button in my...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |