Parameters
- path
- A valid path to a SQLite database that ends with either a '.sqlite' or '.gpkg' extension.
SQLiteConnectionPath
class.Exception | Description |
---|---|
System.ArgumentNullException | path is null. |
System.ArgumentException | The path in path does not end with either a '.sqlite' or '.gpkg' extension. |
public async Task SqliteQueryDescription() { await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() => { using (Database database = new Database(new SQLiteConnectionPath(new Uri("Path\\To\\Sqlite\\Database\\USA.sqlite")))) { QueryDescription washingtonCitiesQueryDescription = database.GetQueryDescription("select OBJECTID, Shape, CITY_FIPS, CITY_NAME, STATE_FIPS, STATE_CITY, TYPE, CAPITAL from main.cities where STATE_NAME='Washington'", "WashingtonCities"); using (Table washingtonTable = database.OpenTable(washingtonCitiesQueryDescription)) { // Use washingtonTable. } } }); }
Target Platforms: Windows 11, Windows 10