public void Initialise(string connectionString, int LogLevel) { m_connectionString = connectionString; try { using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) { dbcon.Open(); Migration m = new Migration(dbcon, Assembly, "mysql"); m.Update(); } } catch (Exception ex) { m_stats.Errors++; m_log.ErrorFormat("[{0}]: MySql port is unable to migrate table, exiting! ->:{1}", "AssetProxy", ex.ToString()); Environment.Exit(-1); } m_stats.TimeStamp = Utils.GetUnixTime(); }
public void Initialise(string connectionString) { m_connectionString = connectionString; m_log.DebugFormat("[UserLogModule]: Sqlite - connecting: {0}", m_connectionString); try { if (Util.IsWindows()) { Util.LoadArchSpecificWindowsDll("sqlite3.dll"); } using (SqliteConnection connection = new SqliteConnection(m_connectionString)) { connection.Open(); Migration m = new Migration(connection, Assembly, "sqlite"); m.Update(); connection.Close(); } } catch (Exception ex) { m_log.ErrorFormat("[UserLogModule]: Initial sqlite exception for URI '{0}', Exception: {1}", m_connectionString, ex.Message); Environment.Exit(-1); } }
public void Initialise(string connectionString) { m_connectionString = connectionString; m_log.DebugFormat("[UserLogModule]: MySql - connecting: {0}", m_connectionString); try { using (MySqlConnection connection = new MySqlConnection(m_connectionString)) { connection.Open(); Migration m = new Migration(connection, Assembly, "mysql"); m.Update(); connection.Close(); } } catch (Exception ex) { m_log.ErrorFormat("[UserLogModule]: Initial mysql exception for URI '{0}', Exception: {1}", m_connectionString, ex); Environment.Exit(-1); } }
public void Initialise(string connectionString) { m_connectionString = connectionString; m_log.InfoFormat("[UserLogModule]: Sqlite - connecting: {0}", m_connectionString); try { if (Util.IsWindows()) Util.LoadArchSpecificWindowsDll("sqlite3.dll"); m_connection = new SqliteConnection(m_connectionString); m_connection.Open(); Migration m = new Migration(m_connection, Assembly, "sqlite"); m.Update(); } catch (Exception ex) { m_log.ErrorFormat("[UserLogModule]: Initial sqlite exception for URI '{0}', Exception: {1}", m_connectionString, ex.Message); Environment.Exit(-1); } }