Previous  Next          Contents  Index  Navigation  Glossary  Library

Formula Errors

There are two types of error that can occur when using Oracle FastFormula:

Uninitialized Variables

An uninitialized local variable is one that has no value when the formula runs. This causes an error in all statements except the Return statement. For example:

	IF   (tax_band < 2000)
	  THEN tax = salary / 8
	IF   (tax_band > 2000)
	  THEN tax = salary / 10
	IF tax > 1000
	  THEN  ...

This formula fails with an 'Uninitialized variable' message (for the variable tax) if the tax band is set to 2000.

Divide by Zero

Dividing a number by zero is an operation that provides no logical result. If this situation ever arises, Oracle FastFormula passes a code indicating an error back to the application (the application then takes the appropriate action).

Always check for the possibility of a divide by zero error if there is any chance it could occur. For example, the formula:

	x = salary/contribution_proportion

produces an error if the contribution proportion is set to zero. In this formula, check for the divide by zero condition as follows:

	IF   contribution_proportion = 0
	  THEN (message = 'The contribution proportion is not valid.'
	        RETURN message)
	ELSE x = salary/contribution_proportion

No Data Found

A database item supposed to be in the database was not found. This represents an error in the application data.

Too Many Rows

The database item definition within the application caused more than one value to be fetched from the database.

Value Exceeded Allowable Range

This can occur for a variety of reasons such as:

Invalid Number

This occurs only when database item contains a bad number.

Null Data Found

A database item was found to have a null value when it should have had a non-null value. Use the Default statement for database items marked as Default Required in the Database Items window.


         Previous  Next          Contents  Index  Navigation  Glossary  Library