Paul P
4th April 2003, 06:51
Dear all,
Is SELECTEOS meant to be executed even when there's no record selected? Thanks very much
Rgds,
Paul
Hitesh Shah
4th April 2003, 08:51
selecteos (End of search) is executed only when there are records selected and selectdo is executed. When breaking sql also it's not executed.
When no records are selected (selectempty), selecteos is not executed.
ulrich.fuchs
4th April 2003, 11:58
In other words, the SELECTEOS is executed for the last record of the selection, after the SELECTDO for this record has been executed. If there is no record selected, only the SELECTEMPTY gets executed.
Paul P
4th April 2003, 14:22
Thanks, guys,
I thought I saw my SELECTEOS being executed when no records are selected. I guess it must have been my imagination :) .
Cheers,
Paul
lbencic
4th April 2003, 19:46
Hey on a sorta related topic if any Baan tools people are reading - how bout a 'Selectfirst' section, sure would be handy for initialization reasons.
askajale
5th April 2003, 03:20
Reading only first record can be achieved by as set with 1 rows.. but what you r thinking is something else and interesting. Do you expect to execute specific actions only for 1st record and then normal selectdo should be executed for rest..! right??
-- Avinash
Paul P
5th April 2003, 03:59
Hmm, a yummy idea :)
ulrich.fuchs
5th April 2003, 12:33
If I had a dream:
I would like to have an arbitrary group definition in my select and an selectendofgroup in the loop. Something like:
SELECT tdpur041.*
ORDER BY tdpur041._index1
GROUPCHANGE tdpur041.orno
SELECTDO
... do something with each position
SELECTEOG
... do something with the order
ENDSELECT
And all that ugly often needed handcoded group-change stuff (if old.orno <> tdpur041.orno) would vanish from the scripts!!!
Uli
lbencic
6th April 2003, 19:07
Yes, I was referring to a new section that gets executed only if records are selected, and only on the first row selected. This would be in addition to the current sections.
Uli, that is an awsome idea!