Re: Why does cachesize > 1 skip records?? Bug??
- From: "Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx>
- Date: Thu, 3 May 2007 14:36:35 -0400
gwhite1@xxxxxxxxx wrote:
I have a simple open and read code:I cannot reproduce this. In a SQL Server 2005 database I have a table
SQL$ = "SELECT I.IMS, d.ZIP, TERRS, SOURCE From rx_uf"
ads.CacheSize = 100
ads.Open SQL$, adb, adOpenForwardOnly, adLockOptimistic
'do stuff
ads.movenext
But this code skips records. When I change the cachesize to 1 it does
not skip records. Why would the cachesize > 1 skip records? Is there a
bug or something else I need to do to make it not skip records.
called "Numbers" that contains a bunch of ... well ... numbers. 200 of
them as a matter of fact. I used this script to try to reproduce your
symptoms:
dim cn, rs, sql, fso,fil
set cn = createobject("adodb.connection")
cn.Open "provider=sqloledb;data source=clnsqldev;" & _
"initial catalog=test;user id=censored;password=censored"
sql="select refnum from numbers order by refnum"
set rs=createobject("adodb.recordset")
rs.CacheSize=100
rs.Open sql,cn,0,3,1
set fso=createobject("scripting.filesystemobject")
set fil=fso.OpenTextFile("numbers.txt",2,true)
do until rs.EOF
fil.writeline rs(0).Value
rs.MoveNext
loop
rs.Close:set rs=nothing
cn.Close:set cn=nothing
fil.close
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
.
- References:
- Why does cachesize > 1 skip records?? Bug??
- From: gwhite1
- Why does cachesize > 1 skip records?? Bug??
- Prev by Date: Re: Why does cachesize > 1 skip records?? Bug??
- Next by Date: Why will this "or" staement not work in VB/SQL ADO
- Previous by thread: Re: Why does cachesize > 1 skip records?? Bug??
- Next by thread: Why will this "or" staement not work in VB/SQL ADO
- Index(es):
Relevant Pages
|
|