Home » Developer & Programmer » Forms » How to get next value in froms (forms.10g)
How to get next value in froms [message #453950] Mon, 03 May 2010 02:38 Go to next message
meena.g
Messages: 14
Registered: February 2010
Location: Hyderabad (A.P)
Junior Member
Hi All,
I created one table with out primary key like well_1 .in that table have have more than 30 columns.

SQL> select uwi,analysis_obs_no,fluid_type,top,base,date_sampled from well_1
2 where uwi ='1000 and base =2871.5;
UWI obs_NO F TOP BASE
---------------- ---- ------ ----- - -----------------------------
1000 1 G 2870.5 2871.5
1000 3 G 2516 2871.5
1000 4 G 2870.5 2871.5
1000 2 G 2870.5 2871.5
1000 6 G 2516 2871.5
1000 5 G 2516 2871.5
1000 7 G 2516 2871.5
1000 1 L 2516 2871.5
1000 2 L 2516 2871.5

7 rows selected.

i did colde like this in from in search panel.
in taht form i will enter uwi and base values and iwill click search button.then it will display all record values in master block .after taht i will click next button then it will dislpy next values(all values).

i am getting all values (1 G to 7 G values).but iam not getting last 2 records when i click next button (1 L to 2 L values ).




next button code:

select analysis_obs_no,fluid_type
into :ctrl1.OBS_NO,:ctrl1.fluid_type
from well_gas_anal
where analysis_obs_no =(select min(analysis_obs_no)
from well_gas_anal
where analysis_obs_no > :ctrl1.OBS_NO
and uwi =:ctrl1.attribute_value
and base = :ctrl1.attribute_value1
and fluid_type = :ctrl1.fluid_type
) and uwi = :ctrl1.attribute_value
and base = :ctrl1.attribute_value1
and fluid_type = :ctrl1.fluid_type;

i tryed in SQL*PLUS like this :


select rowid,analysis_obs_no,fluid_type,rownum
2 from well_gas_anal
3 where rowid=(select min(rowid)
4 from well_gas_anal
5 where analysis_obs_no > &a
6 and uwi ='1000' and base =2871.5 )
7 and uwi ='1000' and base =2871.5
8* and fluid_type is not null
SQL> /

Thnx...
Re: How to get next value in froms [message #453970 is a reply to message #453950] Mon, 03 May 2010 04:07 Go to previous message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I'm not sure I understood what you are saying, but - I'd say that you did it wrong.

  • Data is stored into a table.
  • You should create a data block based on that table.
  • Search is performed with default, built-in Forms functionality:
    • press <Enter query>
    • enter search criteria ("uwi" and "base" values, for example)
    • press <Execute query>
Doing so, you wouldn't have to code any "Next button" because keys UP and DOWN will do that job, as well as Forms' toolbar buttons. No additional code is required.
Previous Topic: change language
Next Topic: what's wronge with this procedure ?
Goto Forum:
  


Current Time: Fri Sep 20 09:44:55 CDT 2024