Re: Seek problem in VB6 program
From: argusy (argusy_at_slmember.on.net)
Date: 01/24/05
- Next message: SteveInBeloit: "From Smart Device project to SQL Server"
- Previous message: Qwert: "Re: Microsoft ActiveX Data Objects library, 2.5 vs 2.8"
- In reply to: ygator: "Re: Seek problem in VB6 program"
- Messages sorted by: [ date ] [ thread ]
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?
- Next message: SteveInBeloit: "From Smart Device project to SQL Server"
- Previous message: Qwert: "Re: Microsoft ActiveX Data Objects library, 2.5 vs 2.8"
- In reply to: ygator: "Re: Seek problem in VB6 program"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|