Community of VE/MapPoint Users and Developers
This is a discussion on Poor performance when getting data from MapPoint Recordset within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi, I am trying to get Data from a MapPoint Recordset and insert them into a Listview control using a ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Poor performance when getting data from MapPoint Recordset I am trying to get Data from a MapPoint Recordset and insert them into a Listview control using a MoveNext loop but it is taking ages to finish (with only 157 records)! The performance is really poor... Is there any better way to get Data from a Recordset object improving performance? Please tell me there is... tia Nikos Code: Public Sub refreshListView(oRS As MapPoint.Recordset)
On Error GoTo Errhandler:
Dim oItem As MSComctlLib.ListItem
Dim oFields As MapPoint.Fields
Dim i As Integer
Dim tempValue As String
Set oFields = oRS.Fields
lstDataGrid.ColumnHeaders.Clear
i = 1
For i = 1 To oRS.Fields.Count
lstDataGrid.ColumnHeaders.Add , , oFields(i).Name
Next
oRS.MoveFirst
Do While Not oRS.EOF
Set oFields = oRS.Fields
i = 0
For i = 0 To oFields.Count - 1
tempValue = Switch(IsNull(oFields(i + 1).Value), "", Not IsNull(oFields(i + 1).Value), oFields(i + 1).Value)
If i = 0 Then
Set oItem = lstDataGrid.ListItems.Add(1, , tempValue)
Else
oItem.SubItems(i) = tempValue
End If
If oFields(i + 1).IsPrimaryKey = True Then oItem.Tag = tempValue
Next
Debug.Print oFields(1)
oRS.MoveNext
Loop
Set oItem = Nothing
Set oFields = Nothing
Exit Sub
Errhandler:
Set oItem = Nothing
Debug.Print Err.Description
Set oFields = Nothing
End Sub |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mappoint: Installation & Performance | Transit | MapPoint 2006/2009 Discussion | 0 | 06-13-2005 03:10 AM |
| Mappoint ActiveX performance | Anonymous | MapPoint 2006/2009 Discussion | 2 | 09-09-2003 05:13 PM |
| MapPoint Add-In performance | rseman | MapPoint 2006/2009 Discussion | 2 | 05-06-2003 08:00 AM |
| Recordset prevents link data | sweenea | MapPoint 2006/2009 Discussion | 0 | 03-03-2003 03:34 PM |
| Deriving a recordset from a mappoint recordset | RichardHayes | MapPoint 2006/2009 Discussion | 0 | 09-06-2002 02:44 AM |
Flights Florida
Flights to Florida are in abundance when you book in advance. Save your money on your flight to spend out there. Book with Holiday Hypermarket.
Cyprus Holidays
Find great Cyprus Holidays with Travel Counsellors. A personal Travel Counsellor can help you plan the perfect holiday to Cyprus.
Cape Town Flight
Book a Cape Town Flight for great value when you book through dealchecker.co.uk. It doesn't take long to find the latest great deals for you.
Holidays to St Lucia
Holidays to St Lucia will leave you smiling. The spectacular scenery and the warmth of the locals make holidays to St Lucia unforgettable.
Cyprus
Before visiting Cyprus, make sure you are well informed to make the most of your holiday. Online at ulookubook.com you check out our useful travel guides. Find out all about the Cyprus nightlife, shopping, eating and customs.
Compare Prices
Travel.co.uk makes it easy for you to compare prices from hundreds of UK based travel companies.
Fuerteventura Holidays
Visit one of the closest Canary Islands to Africa! Book Fuerteventura holidays at On The Beach!