Re: Seek problem in VB6 program

From: argusy (argusy_at_slmember.on.net)
Date: 01/24/05


Date: Mon, 24 Jan 2005 20:07:23 +1030

Not a bug - it's the way messysoft designed ADO.
Using DAO, everytime you do a seek, DAO automatically went to the BOF.
Using ADO, the first seek relocates the cursor.
After that, **** it seeks from the current cursor location ****
What this means, is that a movefirst is a requirement for ADO,
if there's a repetitive seek for info in an ADO recordset

i.e. the following air code will always work

Do while not <whateverADO>.eof
    movefirst
    get <searchdata>
    if searchdata matches exitdata, exit loop
    seek <searchdata>
    Show data
loop

Drop the movefirst, and the seeks will work until the
searchdata is ** previous** to the latest in the index order.
At this point it will go EOF, and it will appear to
create all sorts of mayhem (to you, if you're not aware of it)

Argusy

ygator wrote:
> "Norman Gtz" wrote:
>
>>On Sun, 23 Jan 2005 19:15:02 -0800, ygator wrote:
>>
>>'Try a MoveFirst after opening the Recordset
>
>
> That does work. Thanks.
>
> I assume doing a MoveFirst is not a requirement in doing a Seek, but just
> gets around this bug when doing a Seek on a recordset that is opened in
> adLockReadOnly?
>
> Is there a place to report this bug to Microsoft or will they see it since
> this is one of their newsgroups?



Relevant Pages

  • Re: Seek problem in VB6 program
    ... > 'Try a MoveFirst after opening the Recordset ... I assume doing a MoveFirst is not a requirement in doing a Seek, ... Is there a place to report this bug to Microsoft or will they see it since ...
    (microsoft.public.vb.database.ado)
  • Re: Identity error?? Please help
    ... >> each table has an identity column. ... > It sounds like you've run up against the ADO bug of the year... ... Use GUIDs in place of IDENTITY ...
    (borland.public.delphi.database.ado)
  • Re: comparing distinct data
    ... Your code uses ADO to query an open workbook. ... BUG: Memory leak occurs when you query an open Excel worksheet by using ... The Microsoft OLE DB provider for Jet 4.0 is the provider of choice ...
    (microsoft.public.excel.programming)
  • Re: Problems with Errors (Is this a bug)
    ... > mean it is a bug!!! ... > second query, execute them separately. ... If you need to be able to run arbitrary sql scripts ... >> If I don't know that because ADO.NEt doesn't show it, it is a BUG in ado.. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: update 500000 records with adodb.recordset resize the mdb from 140M to 2G
    ... are you using access 2000 or + and ado less than 2.5 ... if so there is a bug that uses an entire page for 1 single record ... > I have an access database with one table ... > text and numeric fields are updated. ...
    (microsoft.public.vb.database.ado)