Community of VE/MapPoint Users and Developers
This is a discussion on giving an error while compiling.... within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi, I am facing an compilation problem error:"Cannot import data because a connection to the database could not be established" ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| giving an error while compiling.... I am facing an compilation problem error:"Cannot import data because a connection to the database could not be established" This is the code snippet: please anyone kindly help me : 1.I am trying to get the one coulmn of records from table and want to map . plz any other suggestions would be great.... ************************************************** ********* Private Sub Form_Load() Dim MPApp As New MapPoint.Application Dim objMap As MapPoint.Map Dim objLoc As MapPoint.Location Dim szconn As String Dim oDS As MapPoint.DataSet Set objMap = MPApp.ActiveMap MPApp.Visible = True MPApp.UserControl = True With MPApp.ActiveMap.DataSets 'Access database with a query szconn = MPApp.Path & "\Desktop\FirstMap\ED Conference March 2003 expanded.mdb!ZIP" Set oDS = .ImportData(szconn, , geoCountryUnitedStates, , geoImportAccessQuery) End With End Sub ************************************************** *********** thanks Munna |
| |||
| Mappoint giving an error while compiling....
The way you have your code; your access database must be found in the same location as the MPApp.Path. Also you have subdirectories liste as well "\Desktop\FirstMap\ED Conference March 2003 expanded.mdb All of these folder must be under MPApp.Path ( Whatever MPApp.Path location is). Hope this helps |
| |||
|
Sounds like it could be a db location problem. I think Eric's suggestion of printing the path is a good one so that way you'll see exactly where it's looking for the db. You could also try to put your access db in for example C:\ and use the hardcoded path in your app: szconn = "C:\ED Conference March 2003 expanded.mdb!ZIP" that way you'll verify if the error arises from an unlocated db or if it's another issue. Fernando |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| synchronous error | Wilfried | MapPoint 2006/2009 Discussion | 4 | 06-09-2005 04:27 AM |
| Mappoint Error | Mudrover | MapPoint 2006/2009 Discussion | 5 | 01-20-2005 02:59 PM |
| error 4014 | SimonPearse | MapPoint 2006/2009 Discussion | 3 | 01-17-2005 10:47 AM |
| About ERROR 4-40028-1. Error or Bug ? | Anonymous | MapPoint 2006/2009 Discussion | 12 | 01-11-2005 09:32 AM |
| I get this following error | ananthdeena | MapPoint 2006/2009 Discussion | 3 | 01-01-2005 02:46 AM |
Cheap Flights Amsterdam
Looking for cheap flights to Amsterdam? Your search is over. Holiday Hypermarket searches a range of airlines and operators to bring you the latest great offers.
Business Travel Agent
Leading Business Travel Agent. Personal service is at the heart of our business. Talk to one of our travel agents today.
Cuba Holidays
After years of neglect by the western world, Cuba is coming back onto the holiday scene. Cuba Holidays are a unique and enjoyable experience. Book at dealchecker.co.uk.
Holidays to Cancun
The Holiday Place has special offers on holidays to Cancun during the month of September. Book a late summer holiday with us!
Cheap Turkey Holidays
The best time of year to sneak in cheap Turkey holidays is during the off-peak season. Check out the great deals available during April, May or October. For other tips on how to bag a great value holiday simply check online at ulookubook.com
Travel Guides
As far as travel guides are concerned, your best move would be to check out our website at Travel.co.uk
Cheap Lanzarote Holidays
The Canary Islands beckons you to come! View information on cheap Lanzarote holidays at On The Beach!