Re: Search for a value

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Thanks Chris for the clear clarification.

Alastair
"Veign" <NOSPAMinveign@xxxxxxxxx> wrote in message
news:uTU$6tH6FHA.3120@xxxxxxxxxxxxxxxxxxxxxxx
>
>
> "Alastair MacFarlane" <anonymous@xxxxxxxxxxxxx> wrote in message
> news:O86ZAjH6FHA.1148@xxxxxxxxxxxxxxxxxxxxxxx
>> Thanks Chaps!
>>
>> I just though that the last record was where the EOF would be True.
>
> Records in a recordset are stacked like:
>
> ----------------------
> - BOF
> ----------------------
> - Records (if any)
> ----------------------
> - EOF
> ----------------------
>
> BOF is before any records and EOF is after any records.
>
> In a case of no records returned it looks like:
>
> ----------------------
> - BOF /EOF
> ----------------------
>
> Where both BOF and EOF are true.
>
>
>> My mistake. I was just looking for a more difficult answer.
>>
>> Thanks again.
>>
>> Alastair MacFarlane
>>
>> "Alastair MacFarlane" <anonymous@xxxxxxxxxxxxx> wrote in message
>> news:u6jeeGH6FHA.3804@xxxxxxxxxxxxxxxxxxxxxxx
>>> Dear All,
>>>
>>> If I am using ADO to search for a value, like below where Job is a text
>>> field and not the primary key and strSearch is a string value:
>>>
>>> adoRS.Find "[Job] = '" & strSearch & "'"
>>>
>>> ... how do I identify in code whether it has found a match or not. In
>>> DAO you could use NoMatch, but I am unsure in ADO. Since the
>>> Recordset.Find method does not return a value how do you identify
>>> whether a value has been found or not? Is it only whether the cursor is
>>> at the end of the recordset but the last record may contain the searched
>>> for string.
>>>
>>> Please enlighten me on this one.
>>>
>>> Thanks again.
>>>
>>> Alastair MacFarlane
>>>
>>
>>
>
>
> --
> Chris Hanscom - Microsoft MVP (VB)
> Veign's Resource Center
> http://www.veign.com/vrc_main.asp
> Veign's Blog
> http://www.veign.com/blog
> --
>
>


.



Relevant Pages

  • Re: Search for a value
    ... > I just though that the last record was where the EOF would be True. ... BOF is before any records and EOF is after any records. ... but I am unsure in ADO. ... >> recordset but the last record may contain the searched for string. ...
    (microsoft.public.vb.general.discussion)
  • Re: ADO patch for D5? EOF BOF error.
    ... > myquery.close or myquery.free produces the "Either BOF or EOF is true, ... unpatched D5 ADO with MDAC 2.6 or later and the second ADO patch fixed it. ... The ADO patches, two that I know of, are separate from the D5 patch. ...
    (borland.public.delphi.database.ado)
  • Re: Looping through Table records.
    ... the first record - meaning that you have navigated past the first record. ... When BOF and EOF are both true the recordset is empty. ...
    (microsoft.public.access.formscoding)
  • Re: Empty "If Me.Recordset Is Nothing Then" clause causes runtime error 3021 (Access 2003)
    ... "If you delete the last remaining record in the Recordset ... I have some unresolved issues with requery/BOF/EOF, ... >> BOF and EOF are set by a MOVE command. ...
    (microsoft.public.access.forms)
  • Re: Struggling with current record
    ... > "not(.eof and .bof) that was commented out below it. ... Not (.EOF AND .BOF) is equivalent to ... I want to execute the ... > Insert first row into empty form. ...
    (microsoft.public.access.gettingstarted)