Jun 19, 2011 13:32
Once again, I must ask for access to your set of collective knowledge. My Google-fu has failed me on this subject. We have some VBA code that connects to an online MySQL database. It takes data from a table and put it in a recordset. The recordset then gets looped through to add each record to a dictionary object (which is a hash table in VBA). The code works great and takes one tenth of a second.
But, when we connect to a SQL Server database, while the connecting and putting data into the recordset takes less than one second, the looping process takes about ten seconds! We're talking about only 170 records, all the fields are varchars, and there's nothing odd about the data in the table. There's nothing odd about the looping, we're just using objRec.MoveNext.
Does anyone have *any* ideas as to why this should be?
Thank you in advance!