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: Getting the first row from a select

Re: Getting the first row from a select

From: David Ferguson <DavidFerguson_at_csi.com>
Date: 1998/10/07
Message-ID: <#aSvQBg89GA.192@nih2naab.prod2.compuserve.com>#1/1

>'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

Original text of this message

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