MapPoint Forums

MapForums

Community of MapPoint and Virtual Earth 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

Today's Posts Twitter Feed Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #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

Tags
data, mappoint, performance, poor, recordset


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 03:34 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 RC2
MP2K Magazine
Visitor Map

Hurghada Holiday
Enjoy sunny Egypt when you book a Hurghada holiday through UlookUbook at a good price!



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 48 49 50 51 52 53 54 55 56 57 58 59