diff --git a/CHANGELOG.md b/CHANGELOG.md index 66cb95c..2465677 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/ICD.Common.Utils/Globalization/IcdCultureInfo.cs b/ICD.Common.Utils/Globalization/IcdCultureInfo.cs index 5f33a2a..035981b 100644 --- a/ICD.Common.Utils/Globalization/IcdCultureInfo.cs +++ b/ICD.Common.Utils/Globalization/IcdCultureInfo.cs @@ -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; } diff --git a/ICD.Common.Utils/TimeZoneInfo/IcdTimeZoneInfo.cs b/ICD.Common.Utils/TimeZoneInfo/IcdTimeZoneInfo.cs index cbeb900..5d15110 100644 --- a/ICD.Common.Utils/TimeZoneInfo/IcdTimeZoneInfo.cs +++ b/ICD.Common.Utils/TimeZoneInfo/IcdTimeZoneInfo.cs @@ -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 s_Cache;