Home » Developer & Programmer » Forms » how use replace all grid row with variable value
how use replace all grid row with variable value [message #235254] Fri, 04 May 2007 09:31 Go to next message
mfa786
Messages: 210
Registered: February 2006
Location: karachi
Senior Member
hi master
sir i have master detail form
in detail form i have 5 column grid thate have 25 row at time
one column name id
such as id have value 23
but i want replace all id row with 555
how i replace all id in grid with 555 befor commit_form

how i use loop for grid
or any other method

please give me idea

thank's
aamir
Re: how use replace all grid row with variable value [message #235299 is a reply to message #235254] Fri, 04 May 2007 15:34 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Why wouldn't you use the UPDATE statement?
UPDATE this_table SET
  id = 555
  WHERE id = 23;
Those values shouldn't be hardcoded - use reference to form items (newly created ones in a control block, perhaps?).
Re: how use replace all grid row with variable value [message #235318 is a reply to message #235299] Fri, 04 May 2007 23:30 Go to previous messageGo to next message
mfa786
Messages: 210
Registered: February 2006
Location: karachi
Senior Member
thank' for your reply


no your this code replace only last row change not change all grid row

but this code change all row one by one



Go_Block('Detail');
First_Record;
Loop
:detail.item := '...' ;
Exit when :system.last_Record = 'TRUE' ;
Next_record;
End loop;
First_Record ;



Re: how use replace all grid row with variable value [message #235426 is a reply to message #235318] Sat, 05 May 2007 12:24 Go to previous message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
no your this code replace only last row change not change all grid row

No, it would change all occurrences of ID = 23 to 555 in the whole table..
Previous Topic: Query by date only
Next Topic: problem with forms 10g at runtime
Goto Forum:
  


Current Time: Thu Dec 05 13:19:05 CST 2024