mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-14 04:58:33 +00:00
fix: Change sqlite connection strings for IcdCultureInfo & IcdTimeZoneInfo to work with SimplSharp
This commit is contained in:
parent
7d5ec0e636
commit
57e64788c4
3 changed files with 5 additions and 9 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue