Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Heelp need to walk through record

Re: Heelp need to walk through record

From: Alan Mills <Alan.Mills_at_nospamservices.fujitsu.com>
Date: Wed, 30 Oct 2002 10:00:29 -0000
Message-ID: <apoaju$2plr$1@news.icl.se>

"P B" <pbeliveau_at_avcorp.com> wrote in message news:id3truo9djbbsakisrafsr2oi3qsaa5i9f_at_4ax.com...
> On Mon, 28 Oct 2002 21:50:14 GMT, Karsten Farrell
> <kfarrell_at_medimpact.com> wrote:
>
> >P B wrote:
> >> I have a form which access a view. Record are access through a
> >> composite primary key (file no and item name). I am able to move from
> >> item to item using build-in like Next_Record, Previous_Record and
> >> Go_Record which keep me into insert mode.
> >>
> >> The problem: the item are name. I would like to move from one record
> >> to another without doing 200 times next record until I get the one
> >> that I want. Go_Record is not usefull because I do not know the number
> >> of the record associated to his name.
> >>
> >> I cannot also make a form (tab form) in which I list the record all in
> >> one page since there is too many information to show.
> >>
> >> Since I might modify some item, I do not want to exit the inserting
> >> mode and go into query mode to perform the search.
> >>
> >> How can I solve my problem
> >If I understand your question, I think you need a "search" capability.
> >Put a textbox on your form where the user can enter an item name. When
> >they click the Search button, your trigger calls up the record(s) where
> >item name is like whatever they type in the search textbox.
>
>
> If I do that, I would have to leave the inserting mode and go into a
> query mode in which case, the form will ask me if I want to save any
> modification that I've done before which I don't want

Not necessarily. You do not HAVE to do your searching from the database. If you have retrieved all the rows of possible interest your serach could be made from within the form itself. Soemthign alonjg the lines of...

Enter search criteria in control block, press the 'go' button. Go_block('block to serach in');
go to first record.
while (:block.field != 'search value') // or test of your choice then go to next record

This will leave you on a matching record and no need to force a commit because you haven;t cleared the block.

Oh, and remember to catch the last record in case no match is found.

Can't promise how hard this will be for hundreds of records though.

OR

whn you query your database block and add new records to it, maintain a PL/SQL table ro recordset. Do your searching within that. You can then simply Go_Record(x) where x is the result of seraching the PL/SQL table or recordset. Might be easier and quicker than trawling down a large database block. Received on Wed Oct 30 2002 - 04:00:29 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US