MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Checking for the existence of a particular DataSet

This is a discussion on Checking for the existence of a particular DataSet within the MapPoint 2006/2009 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 ...


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

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 01-27-2005
Junior Member
White Belt
 
Join Date: Sep 2004
Posts: 8
Send a message via MSN to joer1234
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.
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 01-28-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,112
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
            }
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
checking, dataset, existence


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
Refreshing a dataset TACEC MapPoint 2006/2009 Discussion 1 10-21-2005 01:08 PM
Creating New Dataset Yazzy MapPoint 2006/2009 Discussion 4 08-23-2005 08:20 AM
Dataset rendering Gianmaria MapPoint 2006/2009 Discussion 3 06-09-2005 03:22 PM
How do you add records to a dataset Anonymous MapPoint 2006/2009 Discussion 1 05-03-2005 04:09 PM
DataSet Modifications ? Anonymous MapPoint 2006/2009 Discussion 1 09-12-2003 03:44 AM


All times are GMT -5. The time now is 02:00 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


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