View Single Post

  #1 (permalink)  
Old 04-11-2003
Anonymous Anonymous is offline
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
Reply With Quote