Re: adSeek equivalent in SQL Server?



You can use criteria on multiple columns when setting the Filter property
....

rst.Filter = "TestText = 'one' AND TestNum = 2"

--
Brendan Reynolds (MVP)


"Sarath" <Sarath@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:DA35277E-A6D9-4665-9676-DE252FBA4710@xxxxxxxxxxxxxxxx
> Thank you Val. But Find method supports only one column . I have a
> composite
> key in which case i guess i have no option but to use Select Query. But i
> what if i need to do Move in the record set. I think it would be more
> expensive to open and close the record set everytime. Am i right?
>
> "Val Mazur (MVP)" wrote:
>
>> Hi,
>>
>> You could use Find method of the recordset, but best approach is to use
>> SELECT with WHERE clause to select specific records rather than to open
>> huge
>> recordset and do a search inside of it. It could be too expensive from
>> the
>> resources point of view and could lock some records.
>>
>> --
>> Val Mazur
>> Microsoft MVP
>>
>> http://xport.mvps.org
>>
>>
>>
>> "Sarath" <Sarath@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:56A06D33-434F-4586-8609-F0B720FBC84E@xxxxxxxxxxxxxxxx
>> > Is there an equivalent for Seek operation in a recordset in SQLOLEDB
>> > provider? if not how can i seek a record from a record set with out
>> > closing
>> > it everytime.
>> > thanks
>> >
>>
>>
>>


.



Relevant Pages

  • Re: Filter Form on multiple criteria
    ... For> example, let's say that I wanted to look for a specific> datein multiple columns. ... >>Alex Dybenko (MVP) ... >>> This is probably a stupid question, but is there a way> to filter a form so ...
    (microsoft.public.access.modulesdaovba)
  • Re: Speeding up multiple updates
    ... Bob Barrows [MVP] wrote: ... Almost worse than creating multiple columns to hold the individual data ... integrity is not compromised. ...
    (microsoft.public.inetserver.asp.db)
  • Re: Invalid Use of Null Error
    ... Josef wrote: ... >i am trying to get data from a record set. ... If they were Variant, then you could assign Null values to ... MVP ...
    (microsoft.public.access.formscoding)
  • Re: No record found on new table
    ... What I actualy try to do is create a table in VBA then setting a record set ... I get the error message no current record set. ... used to create new records and Edit is used to modify ... MVP ...
    (microsoft.public.access.modulesdaovba)