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 2 of 2

Checking for the existence of a particular DataSet

This is a discussion on Checking for the existence of a particular DataSet within the MapPoint Desktop Discussion forums, part of the Map Forums category; My question: How do I code in VB6 to check for the existence of a particular dataset? If the dataset ...

  1. #1
    joer1234 is offline Junior Member White Belt
    Join Date
    Sep 2004
    Posts
    8

    Checking for the existence of a particular DataSet

    My question: How do I code in VB6 to check for the existence of a particular dataset? If the dataset say named "datasetX" exists then I want to delete it and recreate it. (Deleting and recreating it seems like it will be easier as it will contain an extremely large amount of pushpins...)

    Thanks
    J. R.

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

    This is in C#, but you can easy convert it to VB. I think you can use the Index direcly in VB (eg you dont neet the get_Item, and I also think you dont need the object o).

    Code:
                // find a dataset, and if exists delete it
                object o = "DatasetX";
                try {
                    MapPoint.DataSet DatasetX = MP.ActiveMap.DataSets.get_Item(ref o);
                    DatasetX.Delete();
                } catch {
                    // Dataset does not exists
                }

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Refreshing a dataset
    By TACEC in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 10-21-2005, 01:08 PM
  2. Creating New Dataset
    By Yazzy in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 08-23-2005, 08:20 AM
  3. Dataset rendering
    By Gianmaria in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 06-09-2005, 03:22 PM
  4. 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
  5. DataSet Modifications ?
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 09-12-2003, 03:44 AM

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