public DataLogger(string csSource, string csDestination) { this._csSource = csSource; this._csDestination = csDestination; this._HistoryTablePrefix = ""; this._HistoryTableSuffix = "_Log"; this._DataChangeControlColumns = new Dictionary <string, string>(); try { this._oMySqlUtility_Source = new MySqlUtility(csSource); } catch (Exception ex) { throw new Exception("Error when trying to create the source connection", ex); } try { this._oMySqlUtility_Destination = new MySqlUtility(csDestination); } catch (Exception ex) { throw new Exception("Error when trying to create the destination connection", ex); } }
public DataLogger(string csSource, string csDestination) { this._csSource = csSource; this._csDestination = csDestination; this._HistoryTablePrefix = ""; this._HistoryTableSuffix = "_Log"; this._DataChangeControlColumns = new Dictionary<string, string>(); try { this._oMySqlUtility_Source = new MySqlUtility(csSource); } catch (Exception ex) { throw new Exception("Error when trying to create the source connection", ex); } try { this._oMySqlUtility_Destination = new MySqlUtility(csDestination); } catch (Exception ex) { throw new Exception("Error when trying to create the destination connection", ex); } }
public DataSet FindActiveDS() { DataSet ds = new DataSet(); MySqlUtility.ExecuteDataAdapter(null, "select * from company", "company", ds); MySqlUtility.ExecuteDataAdapter(null, "select * from items where inactive = 0", "items", ds); return(ds); }
public override DataSet FindAllDS() { DataSet ds = new DataSet(); MySqlUtility.ExecuteDataAdapter(null, "select * from company", "company", ds); MySqlUtility.ExecuteDataAdapter(null, "select * from vendors", "vendors", ds); return(ds); }
public DataSet FindActiveDS() { DataSet ds = new DataSet(); MySqlUtility.ExecuteDataAdapter(null, "select * from company", "company", ds); MySqlUtility.ExecuteDataAdapter(null, "select * from accounts", "accounts", ds); return(ds); }
public void Retrieve() { IBlobUtility blobUtility = new BlobUtility(); IMySqlUtility mySqlUtility = new MySqlUtility(); GdprUtility gdprUtility = new GdprUtility(blobUtility, mySqlUtility); gdprUtility.Retrieve(new AnonymizeToken(156001, "Want to be anonymized", true)); }
private void connectDB() { if (isConnect == false) { string sqlString = string.Format("Database={0};Data Source={1};User Id={2};Password={3};port={4}", db, host, acc, pwd, port); mySql = new MySqlUtility(sqlString); isConnect = true; LoadDB(); } }
protected void btnTruncate_Click(object sender, EventArgs e) { Backup(); var table = new MySqlUtility(); DataTable dt = table.DtTable(); mysqlConnectie.Open(); var setCheck0 = new MySqlCommand("SET FOREIGN_KEY_CHECKS = 0", mysqlConnectie); setCheck0.ExecuteNonQuery(); for (int i = 0; i < dt.Rows.Count; ++i) { MySqlCommand truncateTable = new MySqlCommand("TRUNCATE " + dt.Rows[i].ItemArray[0].ToString(), mysqlConnectie); truncateTable.ExecuteNonQuery(); } var setCheck1 = new MySqlCommand("SET FOREIGN_KEY_CHECKS = 1", mysqlConnectie); setCheck1.ExecuteNonQuery(); mysqlConnectie.Close(); }
private void convertDB() { isConverting = true; TableConfig[] tableList = MySqlSettings.tableList; foreach (TableConfig tc in tableList) { string tableName = tc.GetTableName(); string[] items = tc.GetItems(); string[] cols = tc.GetCols(); string[] operation = tc.GetOperation(); string[] values = tc.GetValues(); string[] keys = tc.GetKeys(); bool isArray = tc.IsArray(); string JsonPath = pathRoot + MySqlSettings.OUTPUT_PATH + tableName + MySqlSettings.OUTPUT_TYPE; FileUtil.DeleteFileOrDirectory(JsonPath); DataSet ds = mySql.SelectWhere(tableName, items, cols, operation, values); if (ds != null) { if (isArray) { convert2List(JsonPath, ds, keys); } else { convert2Map(JsonPath, ds, keys); } } } isFinished = true; isConverting = false; mySql.Close(); mySql = null; AssetDatabase.Refresh(); instance.Close(); }
public static IDbConnection GetConnection(RepositoryDbProvider dbProvider, string connectionString) { IDbConnection connection; switch (dbProvider) { case RepositoryDbProvider.MariaDb: connection = MySqlUtility.GetConnection(connectionString); break; case RepositoryDbProvider.PostgreSql: connection = PgSqlUtility.GetConnection(connectionString); break; case RepositoryDbProvider.Oracle: connection = OracleUtility.NewConnection(connectionString); break; default: connection = MySqlUtility.GetConnection(connectionString); break; } return(connection); }
public override UtilityCollection getAllMasterSkinsFromDB() { return(storeSkins(MySqlUtility.getAll("MasterSkins"))); }
public static IDbConnection GetConnection() { return(MySqlUtility.GetConnection()); }