| | |
| | | |
| | | namespace HMI.Core.Util |
| | | { |
| | | public class SqliteHelper |
| | | public class SqliteHelper:IDisposable |
| | | { |
| | | private string DataBaseFile = string.Empty; |
| | | public string DataBaseFile { get; private set; } = string.Empty; |
| | | |
| | | private string ConnectString = string.Empty; |
| | | |
| | |
| | | public SqliteHelper(string DBFile) |
| | | { |
| | | DataBaseFile = DBFile; |
| | | ConnectString = "DataSource=" + DataBaseFile + ";Version=3;Pooling=False;Max Pool Size=100"; |
| | | ConnectString = "DataSource=" + DataBaseFile + ";Version=3;Pooling=False;Max Pool Size=100;"; |
| | | conn = new SQLiteConnection(ConnectString); |
| | | cmd = new SQLiteCommand(conn); |
| | | } |
| | |
| | | conn.Close(); |
| | | } |
| | | } |
| | | |
| | | public void Dispose() |
| | | { |
| | | this.Close(); |
| | | } |
| | | } |
| | | } |