(I thought the answer to this question would be in the Oracle FAQ,
but having had a look though it, I can't see it.)
How can I tell, within SQL*Forms 3, if a global varriable has been
declared.
The story so far ...
I have a form called 'courses' which contains a bit of code:
:global.value := :details.value;
call ('categories', NO_HIDE);
...
The global :global.value is being used to pass 'value' into the
called form 'categories'.
In the 'categories' form, another bit of code grabs the value being
passed from 'courses' as below:
:control.value := :global.value;
...
This works wonderfully, until some twit calls the 'categories' form
from the command line instead of from the other form, and
:global.value isn't defined. SQL*Forms, as would be expected, gives
the error:
'FRM-40815 Variable :GLOBAL.value does not exist'
and then carries on regardless; wiping a whole pile of records as a
consequence.
Surely, there must be a way of testing to see if :global.value exists
without having to resort to an messy 'on-error' trigger.
Any ideas would be most appreciated.