S
Shay
essentially I am trying to do some counts based on some
assumptions in the recordset. So I get the RS back, put
the values into a variable, move to the next record in the
RS and compare what is in the variable to the value in the
next record in the recordset and do a count. Then
overwrite the value in the variables and do the same for
the next record and so.
But this runs extremly slow. 5000 records takes about 10
minutes in IE6 and I can only guess it is the stepping
through the RS that is the problem?? There are only 4
fields in the RS...but the comparisons seem to take
forever and wondering is there something I am doing wrong
or anything I can do to speed it up???
Thanks in advance
set lRS = moConn.Execute(sSQL)
if not lRS.EOF then
iCnt = 0
iTransfers = 0
iRepeatCalls = 0
iRealACWs = 0
Do While Not lRS.EOF
if iCnt <> 0 then
if (sInternal_No = Trim(CStr(lRS("Internal Card
No")))) and (sSupp_No = Trim(CStr(lRS("Supp No")))) and
(sUser_Id = Trim(CStr(lRS("User Id")))) then
'do something
end if
sInternal_No = Trim(CStr(lRS("Internal Card No")))
sSupp_No = Trim(CStr(lRS("Supp No")))
sContact_Time = lRS("Contact Date/Time")
sUser_Id = Trim(CStr(lRS("UserId")))
lRS.MoveNext
Loop
assumptions in the recordset. So I get the RS back, put
the values into a variable, move to the next record in the
RS and compare what is in the variable to the value in the
next record in the recordset and do a count. Then
overwrite the value in the variables and do the same for
the next record and so.
But this runs extremly slow. 5000 records takes about 10
minutes in IE6 and I can only guess it is the stepping
through the RS that is the problem?? There are only 4
fields in the RS...but the comparisons seem to take
forever and wondering is there something I am doing wrong
or anything I can do to speed it up???
Thanks in advance
set lRS = moConn.Execute(sSQL)
if not lRS.EOF then
iCnt = 0
iTransfers = 0
iRepeatCalls = 0
iRealACWs = 0
Do While Not lRS.EOF
if iCnt <> 0 then
if (sInternal_No = Trim(CStr(lRS("Internal Card
No")))) and (sSupp_No = Trim(CStr(lRS("Supp No")))) and
(sUser_Id = Trim(CStr(lRS("User Id")))) then
'do something
end if
sInternal_No = Trim(CStr(lRS("Internal Card No")))
sSupp_No = Trim(CStr(lRS("Supp No")))
sContact_Time = lRS("Contact Date/Time")
sUser_Id = Trim(CStr(lRS("UserId")))
lRS.MoveNext
Loop