Re: Waiting for a recordset to finish fetching
- From: "William Vaughn" <billvaNoSPAM@xxxxxxxxx>
- Date: Thu, 26 Jul 2007 11:46:05 -0700
Are you sure? I got the impression that JET started to deliver rows before the rowset population is complete. SQL Server does this too--it delivers the first rows to ADO.NET (to the provider) when the first buffer is done. These rows are streamed over in the DataReader as they are made available on the server. No, JET is not SQL Server and JET's provider is very different than SqlClient but I would not be surprised if JET started making rows available before the last one was found--at least to the DataReader (which is behind the scenes in ADO classic). If the application tries to update the rows fetched, I have also seen JET open another connection and start making changes.
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------
"Stephen Howe" <stephenPOINThoweATtns-globalPOINTcom> wrote in message news:%23qFJGQ7zHHA.600@xxxxxxxxxxxxxxxxxxxxxxx
But, yeah, the point is that my theory is that ADO is still working on
building the recordset at the time the find executes.
How? Only if asynchronous.
If it Client-Sided and not asynchronous, it is never true.
Open() will not be returned from early.
Only when the last record is loaded will Open() return.
If it is Server-Sided, Find() does not work well AFAIK.
I am not even sure what it does.
Some day I will make some tests to find out.
Find() could, in theory, only work on the portion of the Recordset loaded in memory.
Remember Server-Sided cursors are very very different from Client-sided.
For Server-Sided cursors, ADO is just a thin layer over what the database provides.
Things like Filter, Sort, Find are designed to worked on client-sided recordsets because all records are available in memory.
For server-sided recordsets you should use the SQL WHERE clause and ORDER BY clause to do filtering, sorting, finding
My guess is you do have Server-sided cursor and are getting unpredicatable results from Find().
Best bet is to change the CursorLocation to Client-sided.
Find() will work correct after that.
Stephen Howe
.
- Follow-Ups:
- Re: Waiting for a recordset to finish fetching
- From: Stephen Howe
- Re: Waiting for a recordset to finish fetching
- References:
- Re: Waiting for a recordset to finish fetching
- From: Stephen Howe
- Re: Waiting for a recordset to finish fetching
- From: JoelB
- Re: Waiting for a recordset to finish fetching
- From: Stephen Howe
- Re: Waiting for a recordset to finish fetching
- Prev by Date: Re: Waiting for a recordset to finish fetching
- Next by Date: Re: Waiting for a recordset to finish fetching
- Previous by thread: Re: Waiting for a recordset to finish fetching
- Next by thread: Re: Waiting for a recordset to finish fetching
- Index(es):
Relevant Pages
|
|