- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm using the following to populate a table. Not included here is a step where the record set is counted to determine the number of rows required. The table is then created and the last step is to populate the cells with data.
'building a set of records from the connection string based on SQL statement
Set myrs = myConnection.Execute(myss)
varRow = 2
Do Until myrs.EOF
varSheetNumber = myrs("Sheet_Num")
varDescription = myrs("Item_Description")
varRoom = myrs("Room")
varFloor = myrs("Floor")
varTitle = myrs("Drawing_Title")
table.SetText varRow, 0, varSheetNumber
table.SetText varRow, 1, varDescription
table.SetText varRow, 2, varRoom
table.SetText varRow, 3, varFloor
table.SetText varRow, 4, varTitle
varRow = varRow + 1
myrs.MoveNext
Loop
'closing dbase connections
dbclose
Set myrs = Nothing
Set myss = Nothing
End If
Now, if i comment out the Table.Settext lines the routine runs in a fraction of a second, even when the recordset contains hundreds of records.
Once I run those lines though, it can take upwards of 10 minutes to populate the table if there are a couple hundred records.
Anyone know why, or have a better way of doing this?
Thanks in advance
Solved! Go to Solution.