mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-01-11 19:44:55 +00:00
fix: Change sqlite connection strings for IcdCultureInfo & IcdTimeZoneInfo to work with SimplSharp
This commit is contained in:
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
### Changed
|
||||
- Changed sqlite connection strings in IcdCultureInfo & IcdTimeZoneInfo to work with SimplSharp.
|
||||
|
||||
## [16.0.0] 2021-10-04
|
||||
### Added
|
||||
|
||||
@@ -96,11 +96,8 @@ namespace ICD.Common.Utils.Globalization
|
||||
{
|
||||
private const string SQL_LOCAL_DATABASE_FILE = "CultureInfo.sqlite";
|
||||
private const string SQL_CONNECTION_STRING_FORMAT =
|
||||
#if SIMPLSHARP
|
||||
"Data Source={0};Version=3;ReadOnly=True";
|
||||
#else
|
||||
"Data Source={0}";
|
||||
#endif
|
||||
|
||||
private const string SQL_CMD_SELECT_BY_NAME = "select * from cultureinfo where name = @name collate nocase";
|
||||
private const string SQL_CMD_SELECT_BY_LCID = "select * from cultureinfo where lcid = @lcid";
|
||||
private const string SQL_CMD_SELECT_BY_ID = "select * from cultureinfo where id = @id";
|
||||
@@ -466,8 +463,9 @@ namespace ICD.Common.Utils.Globalization
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
catch (Exception e)
|
||||
{
|
||||
IcdErrorLog.Exception(e, "Error populating IcdCultureInfo cache - {0}", e.Message);
|
||||
s_IsDatabasePresent = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -18,11 +18,7 @@ namespace ICD.Common.Utils.TimeZoneInfo
|
||||
|
||||
private const string SQL_LOCAL_DATABASE_FILE = "TimeZones.sqlite";
|
||||
private const string SQL_CONNECTION_STRING_FORMAT =
|
||||
#if SIMPLSHARP
|
||||
"Data Source={0};Version=3;ReadOnly=True";
|
||||
#else
|
||||
"Data Source={0}";
|
||||
#endif
|
||||
|
||||
private static readonly Dictionary<string, IcdTimeZoneInfo> s_Cache;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user