Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL version for Forms 3.0,4.5,5.0 questions...
On 4 Nov 98 20:01:57 GMT, reichmanm_at_removethis.rl.af.mil. (Mark S.
Reichman) wrote:
>We are uprading our Forms from 3.0 to 5.0.
>Some of our code is compiling fine but failing
>to "Behave" as it did in Forms 3.0.
>I believe Forms 3.0 and 4.5 used PL/SQL ver 1 and
>Forms 5.0 uses PL/SQL ver 2. Here is an example of
>code we had in 3.0.
>
>
>begin
>select yada1, yada2
> into :bing1, :bang2
> from boom
> where yada1 = xyz;
>exception
>when no_data_found then
>null;
>when too_many_rows then
>null;
>end;
>
>Now, believe it or not when you had too_many_rows the
>ver 1(Forms 3.0,4.5)of PL/SQL would fill the current record
>of the form with data. I believe it worked out to be
>the last row selected in the PL/SQL statement.
>However, the newer
>Forms 5.0 ver 2 PL/SQL actually does nothing (Null),
>just like it says.
Personally I would use a cursor to fetch one row, but you could use
the following...
begin
select
yada1, yada2
into
:bing1, :bang2
from
boom
where
yada1 = xyz and
rownum = 1 /* << only first row if mutiple rows are returned */
exception
when no_data_found then
null;
/* you can then remove the exception handling for too many rows */
end;
Hope this helps
Paul
Received on Thu Nov 05 1998 - 08:02:50 CST
![]() |
![]() |