02-18-2018 04:15 AM - edited 02-18-2018 05:28 AM
I want to make a connection to a shapefile, and I used the following code:
PClient.Connection pClientConnectionSHP_Points = this._currentApplication.CreateService("GeoMedia.Connection") as PClient.Connection; pClientConnectionSHP_Points.Location = @"C:\Users\A\Desktop\SDRFiles\SHP\Points"; pClientConnectionSHP_Points.Mode = 0; pClientConnectionSHP_Points.Type = "AV.GDatabase"; pClientConnectionSHP_Points.Name = "Points SHP Connection"; pClientConnectionSHP_Points.Connect();
and it gives me the following error "Unable to connect to the database. Please verify that your warehouse-connection parameters are correct and try again.".
the location folder (C:\Users\A\Desktop\SDRFiles\SHP\Points) contains the following files:
Thanks for your help
02-18-2018 08:01 AM
I cannot see any other problem. Try to double check the path. Also you can query Connection.Database.GErrors collection to see if there is a more detailed error description.