MapSuite Team,
When using the SQLiteConnection the feature layer is created, however on the Open an exception occurs. When using the actual connection string the Open does not encounter an exception.
The following Open results in the exception – “Data Source cannot be empty. Use :memory: to open an in-memory database”
TheSqliteFeatureLayer = new SqliteFeatureLayer(anSQLiteConnection, “TableName”, “Id”, “geometry”);
TheSqliteFeatureLayer.Open();
The following Open does not result in an exception:
TheSqliteFeatureLayer = new SqliteFeatureLayer(anSQLiteConnection.ConnectionString, “TableName”, “Id”, “geometry”);
TheSqliteFeatureLayer.Open();
The ConnectionString in both cases is:
Data Source=C:\OriStar\Chicago\OriStarVisionMapSuite\MapSQLite\BikeRoutes.sqlite;Version=3;
If the exception is caught and ignored the layer is actually opened and any other actions on the layer are successful.
Thanks,
Dennis
Message=Data Source cannot be empty. Use :memory: to open an in-memory database
System.Data.SQLite
at System.Data.SQLite.SQLiteConnection.Open()
at ThinkGeo.MapSuite.Layers.SqliteFeatureSource.GetColumnNames(String connectionString, String tableName)
at ThinkGeo.MapSuite.Layers.SqliteValidatorHelper.CheckFeatureIdAndGeometryColumn(String connectionString, String tableName, String featureIdColumn, String geometryColumnName)
at ThinkGeo.MapSuite.Layers.SqliteFeatureSource.OpenCore()
at ThinkGeo.MapSuite.Layers.FeatureSource.Open()
at ThinkGeo.MapSuite.Layers.FeatureLayer.OpenCore()
at ThinkGeo.MapSuite.Layers.Layer.Open()
at OriStarFileGeoDatabase.GeneralMethods.PopulateDatabaseCollectionSQLiteTables(SQLiteConnection TheDbConnection, clsGeoDatabaseItem& oGeoDatabaseItem) in C:\OriStarMappingIncMapSuiteV10Secondary\OriStarFileGeoDatabase\TheGeneralMethods.cs:line 473