Skip navigation.

Gerd Volberg

Syndicate content
Gerd Volberghttps://plus.google.com/112025002220932489494noreply@blogger.comBlogger125125
Updated: 13 hours 38 min ago

Don't use INC and DEC in PL/SQL Libraries

Wed, 2014-03-19 05:01
In my oldest PL/SQL-Library in Forms 4 my first procedures were:

PROCEDURE Inc (P_Number IN OUT NUMBER) IS
BEGIN
P_Number := P_Number + 1;
END;

PROCEDURE Dec (P_Number IN OUT NUMBER) IS
BEGIN
P_Number := P_Number - 1;
END;

In some variations with one or two parameters I used this Increment and Decrement since 20 years! Without having trouble in all the days.

Now I found out, that DEC isn't working in newer Oracle Forms versions...

And why? Oracle created in PL/SQL a new SUBTYPE of DECIMAL and it is called "DEC". So you can use it in this way:
DECLARE
V_Value DEC;
BEGIN
... 
 
And this behaviour kills my procedure in the PL/SQL-Library :-(
All other languages know INC and DEC for incrementing and decrementing. Not Oracle!

Be careful when creating new functions which you want to use for a long time :-)
Gerd

New Statement of Direction, September 2013

Wed, 2014-01-08 03:32
The actual lifetimes of Forms and Reports can be found in this document.

The most important at a glance:


Here are some of my older Statement of Directions private copies:

SoD Oracle Fusion 2013 / 09
SoD Forms 2012 / 03
SoD Oracle Fusion 2010 / 05
SoD Forms 2009 / 07
SoD Forms 2008 / 07
SoD Forms 2007 / 11
SoD Forms 2005 / 09
SoD Forms 2005 / 05
SoD Forms 2005 / 03
SoD Forms 2004 / 06

My previous article on this topic is here