Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 3 of 3

Total numbers of records/pushpins in dataset.

This is a discussion on Total numbers of records/pushpins in dataset. within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi guys, It's maybe a stupid question, but I couldn't find any answers in this forum. I want to know ...

  1. #1
    VC_Man is offline Member Green Belt
    Join Date
    Nov 2006
    Posts
    93

    Total numbers of records/pushpins in dataset.

    Hi guys,

    It's maybe a stupid question, but I couldn't find any answers in this forum. I want to know the total pushpins in a dataset (PushpinSet). I've used the method GetRecordCount(), but it just gives me like the name of the pushpins. Maybe I'm wrong, but if I'm not, how can I retrieve the total amount of pushpin in a Dataset?

    Thank you guys!

  2. #2
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

    Re: Total numbers of records/pushpins in dataset.

    Hi,

    Good question
    I never needed it, but trying to find answer to your question I cannot find it neather Maybe Microsoft forgot it ?
    Eventually ou keep a linked list to all your pushpins, then you have the count in your own class (that's what I do).

  3. #3
    VC_Man is offline Member Green Belt
    Join Date
    Nov 2006
    Posts
    93

    Re: Total numbers of records/pushpins in dataset.

    Thnx for your reply Wilfried,

    But to make another linked list, makes things only more confusing. It is possible to put the pushpins to a created dataset (using CDataSets::AddPushpinSet("name")), by using CPushpin::MoveTo(). So than there must be a way to get the total number of pushpins in it.

    I also figured out that I've made a mistake in my code. So it is possible to get the total number of pushpins with the GetRecordCount().

    I only use the linked-list to get the right pointer to the wanted CDataSet object. Actually I do this:

    GetTarget ()
    {
    for(i=0;i<List.TotalItems;i++)
    {
    SearchPointer = List.pointer /*pointer to a classobject with info*/
    if(NameTarget == SearchPointer->targetname)
    return true;
    }
    return false;
    }

    So if GetTarget returns true, than we can get:
    SearchPointer->PointerToDataSet /*
    SearchPointer->TotalItems
    etc... Depending on what you defined in the class. The PointerToDataSet contains the pointer to the wanted DataSet ofcourse. And when you get this pointer, than ofcourse you can search in the dataset object for pushpins and perform other functions related to the DataSet object.

    Thank you

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How do you add records to a dataset
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 05-03-2005, 04:09 PM
  2. How do you add records to an existing dataset?
    By stephenmillington in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 09-07-2004, 05:24 AM
  3. Records matched to Zip Code don't have Pushpins
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 08-26-2004, 04:12 PM
  4. mappoint dataset - pushpins
    By itmanager in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 11-07-2003, 06:27 AM
  5. If I have one dataset with 300 pushpins, how do i ....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 02-26-2002, 01:52 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


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 60 61 62 63 64 65 66