Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Getting the first row from a select
>'Open the table
>set rec=db.openrecordset("Company",dbopentable)
>
>'Tell the engine you seek using that index
>rec.index="Company"
>
>'Lookup the item
>rec.seek ">=", WhateverWasEntered
>
>'check you found one
>if not rec.nomatch then
> 'BINGO, YOU HAVE THE FIRST ONE AND YOU DID NOT BROWSE THE HUGE TABLE...
>endif
I am not a VB DAO expert but...I thought the DAO .seek function performed a full table search. I believe this would involving reading all of the records into the client to scan for the 'WhateverWasEntered' this could potentially take a long very long time.
Cheers...David Received on Wed Oct 07 1998 - 00:00:00 CDT