MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




problems with queryshape

This is a discussion on problems with queryshape within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Trying to return all pushpins in a shape with 3 datasets on map. As i iterate through the shapes I ...


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 09-08-2006
Junior Member
White Belt
 
Join Date: Aug 2006
Posts: 8
problems with queryshape

Trying to return all pushpins in a shape with 3 datasets on map. As i iterate through the shapes I get the same count of "3" regardless of how many pushpins are in shape . . . what am i doing wrong?

Code:
     tshapes = objmap.Shapes.Count
        Do While tshapes <> 0
            Set objshape = objmap.Shapes.Item(tshapes)
            objshape.Select
            Set objrec = objdata.QueryShape(objshape)
              MsgBox Str(objdata.RecordCount)
            objrec.MoveFirst
            reccount = 1
            Do While Not objrec.EOF
                reccount = reccount + 1
            Loop
            msgbox reccount
            tshapes = tshapes - 1
        Loop

Last edited by Wilfried; 09-08-2006 at 01:46 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 09-08-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,055
Hi,

The first messagebox will popup (with the record count I assume), but then your code runs forever in the second loop because you dont increment the cursor in the recordset. You have to call MoveNext in the second loop. Or there is no record and the result is already EOF.
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
VB6 error "Method 'QueryShape' of object 'DataSet' fail David J MapPoint 2006/2009 Discussion 2 12-07-2005 01:13 PM
QueryShape dont work as expected Bed007 MapPoint 2006/2009 Discussion 3 10-23-2005 02:39 PM
Problem with dataset.QueryShape Method Ray Liu MapPoint 2006/2009 Discussion 1 07-15-2004 10:55 AM
Huge memory leak in using QueryShape? random0000 MapPoint 2006/2009 Discussion 2 03-28-2003 05:22 AM
QueryShape problem Please help Anonymous MapPoint 2006/2009 Discussion 2 03-13-2003 08:57 AM


All times are GMT -5. The time now is 11:21 PM.


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

Wengen Skiing
Wengen is known as one of those classic Swiss ski resorts that have a relaxed atmosphere and stunning scenery. Experience Wengen skiing holidays yourself, book online.

City Breaks
Top 10 City Breaks . Based on holidays booked this year, these are the most popular City Breaks for 2006

Holidays Italy
Book your holidays in Italy. Italy has a great climate and the beaches to go with it. Book a great deal for great value online at dealchecker.co.uk.

All Inclusive Maldives
Visit The Holiday Place.co.uk for great deals on all inclusive holidays to the Maldives. Book a holiday to the outstandingly beautiful Maldives.

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.

Cheap family holidays
To plan cheap family holidays, use Travel.co.uk to explore all the delightful possibilities that there are.

Gran Canaria Holidays
Visit the Canary Islands! See information on Gran Canaria 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 48 49 50 51