Re: SQL*Forms 3.0 - a rather technical question

From: <James>
Date: Thu, 26 Jan 1995 12:38:48 GMT
Message-ID: <1995Jan26.123848.25804_at_newton.ccs.tuns.ca>


In article <3fi9q7$cot_at_legba.synergy.net> don_at_rs320h.ai.com (Don Granaman) writes:
>We have more than 600 screens that are in production using SQL*Forms 3.0
>and Oracle 6 on more than a dozen different platforms (please don't ask
>for a specific version of SQL*Forms or Oracle - no two are quite the same!).
>Most of these screens rely on the trick of intentionally generating an
>error when the [List] key is pressed in query mode to call a custom lookup
>screen. This has been humming along with no problems for years, but now
>we are moving to Oracle 7.0 and it no longer works. It now puts up
>SQL*Forms "normal" (read "lame") list window! Does anyone know why?
>How can I "break" this so it works again!!? (Oracle Forms 4.0+ is not
>yet an option on some of these machines.) Is the changed behaviour due
>to the differences in the in the Oracle or PL/SQL versions?
>The versions of SQL*Forms are "close". Hmmm... Specifics follow ...
>
>List values text:
> LOV_TEXT = <<<
> select null from MS.DUAL
> >>>
>/* or */
> LOV_TEXT = <<<
> select sum('X') from MS.DUAL
> >>>
>[...]
> DEFINE TRIGGER
>
> NAME = ON-ERROR
> TRIGGER_TYPE = V3
> TEXT = <<<
> if ERROR_CODE = 40502 then
> call_custom_lookup_screen;
> else
> message (ERROR_TYPE || '-' || to_char(ERROR_CODE) || ': '
> || ERROR_TEXT);
> bell;
> end if;
> >>>
>
> ENDDEFINE TRIGGER
>
>Newer release (where it doesn't work):
> SQL*Forms Run Form: Release 3.0.16.12.7 - Production
> ORACLE7 Server Release 7.0.16.6.0 - Production
> PL/SQL Release 2.0.18.1.0 - Production
> Using Oracle Toolkit Version 01.00.20.03.01 (Production)
> Using PL/SQL Version 01.00.39.00.01 (Production)
> Using SQL*Menu Version 05.00.11.13.05 (Production)
>
>Example of older release - (where it does work) - selected at random:
> ORACLE RDBMS V6.0.37.3.1, transaction processing option - Production
> PL/SQL V1.0.39.0.1 - Production
> Using Oracle Toolkit Version 01.00.20.03.01 (Production)
> Using PL/SQL Version 01.00.39.00.01 (Production)
> Using SQL*Menu Version 05.00.11.13.04 (Production)
>
>Any help would be appreciated! Please post as e-mail is often flaky.
>
>-Don Granaman
>
> default_value (NULL,'GLOBAL.SIG');

Seems to me that you are going about this all wrong. If you don't like the pop-up LOV window /*it's not pretty*/ just create a trigger KEY-LISTVAL on the field.

text = < :GLOBAL.VAL := '';

         CALL_QUERY ('new_form');
         :field := :GLOBAL.VAL;
       >

and in your called form,
set :GLOBAL.VAL to the value of the current field on exit.

Presto!! I've been doing this since SQL*FORMS v2.0. p.s. take all the crap out of the LOV field,

     otherwise it will just confuse you in the future.

Good Luck!

James Richard (JRICHARD_at_TUNS.CA)
"No Assember Required!" Received on Thu Jan 26 1995 - 13:38:48 CET

Original text of this message