Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Looping Through A Recordset

What database? This is incredibly slow for 55k records (I'm assuming that
the number of records returned by the query is relatively small).

Does the query take a similar amount of time if you execute it in a
different query tool?

tim


"ibeetb" wrote in message
...
I am looping through a recordset but it is taking FOREVER. It is a DB

field
that I am trying to collect a Disitinct list from. Here is the code: By

the
way, this code is tunning in Excel using ADO...
By the way, there are a total 0f 55000 records to loop through. Anyway I

can
make this faster. It takes 5-6 minutes to create a distinct recordset


'Fills the Teams list box with available team names
src = "SELECT DISTINCT
public.tts_time_weekly_report_display.team_name "
src = src & "FROM public.tts_time_weekly_report_display "
src = src & "WHERE
public.tts_time_weekly_report_display.tts_time_wee k_worked '12/31/2002'

"
rs.Open Source:=src, ActiveConnection:=cnn

Do While Not rs.EOF
frmTeams.lstTeam.RowSource = rs
frmTeams.lstTeam.AddItem rs.Fields("team_name").Value
rs.MoveNext
Loop






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
query a recordset SAm Excel Discussion (Misc queries) 2 May 1st 07 09:33 PM
return recordset Laurent M Excel Discussion (Misc queries) 4 January 26th 05 09:43 AM
Looping Through A Recordset Bob Phillips[_5_] Excel Programming 0 August 19th 03 03:34 PM
ADODB Recordset Seth[_3_] Excel Programming 0 August 5th 03 02:15 PM
Default recordset type? -\) Excel Programming 3 July 23rd 03 09:16 AM


All times are GMT +1. The time now is 08:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"