MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Poor performance when getting data from MapPoint Recordset

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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-22-2003
Junior Member
White Belt
 
Join Date: Oct 2003
Posts: 3
Poor performance when getting data from MapPoint Recordset

Hi,

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
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
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


All times are GMT -5. The time now is 01:17 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5
MP2K Magazine
Visitor Map

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!


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47