Re: Getting the first row from a select

From: David Ferguson <DavidFerguson_at_csi.com>
Date: 1998/10/07
Message-ID: <#aSvQBg89GA.192_at_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

[Quoted] [Quoted] 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 CEST

Original text of this message