MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




giving an error while compiling....

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" ...


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 04-11-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
giving an error while compiling....

Hi,

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
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 04-11-2003
Eric Frost's Avatar
Senior Member
Black Belt
 
Join Date: Jul 1992
Posts: 2,304
Blog Entries: 1
Just some ideas.. do you have access installed on the machine? it might need to be.

Also, check the path (e.g. MsgBox szConn) right before the Set oDS statement.

Eric
__________________
~ Now taking orders for MapPoint 2009 ~
~
~ Upgrade to MapForums Plus membership ~
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 06-25-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 06-26-2003
Fer Fer is offline
Junior Member
White Belt
 
Join Date: Jun 2003
Posts: 11
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
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
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


All times are GMT -5. The time now is 09:10 AM.


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

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!


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