public CDBSynchronizer(string fromHost, string fromDB, string fromUser, string fromPassword,
                               string toHost, string toDB, string toUser, string toPassword,
                               IClientDatabaseConnector dbClient,
                               IAlarmable alarmer)
        {
            _conFrom = new CMySQLConnector(fromHost, fromDB, fromUser, fromPassword, alarmer, dbClient);
            _conTo   = new CMySQLConnector(toHost, toDB, toUser, toPassword, alarmer, dbClient);

            _conFrom.Connect();
            _conFrom.GenTablesSchemas();

            _conTo.Connect();
            _conTo.GenTablesSchemas();
        }
Example #2
0
        /*
         * public bool IsConnected
         * {
         *  get
         *  {
         *      if (_connection != null)
         *          if (_connection.State == ConnectionState.Open)
         *              return true;
         *
         *
         *
         *
         *          return false;
         *
         *
         *  }
         *
         * }
         */



        public CMySQLConnector(string host, string database, string user, string password,
                               IAlarmable alarmer, IClientDatabaseConnector dbConnectorClient)
            : base(alarmer)


        {
            _dbConnectorClient = dbConnectorClient;


            _host     = host;
            _database = database;
            _user     = user;
            _password = password;

            //if (_connection.State == ConnectionState.Open)
            //  GenTablesSchemas();
        }