I have a SDF file and I want to add to MAP with MAPCONNECT.
After, I am wanting execute "Add to Map".
I can't find it for 10 days, I could not do
Code is see the SDF file, but can not add to the Data Connect Window (mapconnect) in the code below
Can you help me?
I have next plan connect with .xlsx file :))
Maybe , after that I can add queries and Filters.
-I will definitely add- :))))
CODE:
Private Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click
Dim connectionManager As OSGeo.FDO.IConnectionManager = FeatureAccessManager.GetConnectionManager()
Dim Provider As String = "OSGeo.SDF.4.2"
Dim conn As IConnection = connectionManager.CreateConnection(Provider)
Dim fileName As String = "C:\Temp\Test20.SDF"
conn.ConnectionInfo.ConnectionProperties.SetProperty("ReadOnly", False.ToString())
conn.ConnectionInfo.ConnectionProperties.SetProperty("File", fileName)
conn.ConnectionInfo.ConnectionProperties.SetProperty("MaxCacheSize", False.ToString())
Dim connInfo As IConnectionInfo = conn.ConnectionInfo
Dim properties As IConnectionPropertyDictionary = connInfo.ConnectionProperties
conn.Open()
conn.Close()
End Sub