Пример #1
0
        /// <summary>
        /// Setup the accounts connections pool.
        /// </summary>
        /// <param name="aCount">The number of connections in the pool.</param>
        /// <param name="aHost">The hostname of the MySQL server</param>
        /// <param name="aDatabase">The database to connect to</param>
        /// <param name="aUsername">The username to use to connect to the database</param>
        /// <param name="aPassword">The password to use to connect to the database</param>
        /// <returns>True on success, false otherwise.</returns>
        public static bool SetupAccMySQL(int aCount, String aHost, String aDatabase, String aUsername, String aPassword)
        {
            sAccPool = MySqlConnectionPool.CreatePool(aCount, aHost, aDatabase, aUsername, aPassword);
            if (sAccPool != null)
            {
                sAccPool.Name = "Accounts";
            }

            return(sAccPool != null);
        }
Пример #2
0
        /// <summary>
        /// Setup the IP2Location connections pool.
        /// </summary>
        /// <param name="aCount">The number of connections in the pool.</param>
        /// <param name="aHost">The hostname of the MySQL server</param>
        /// <param name="aDatabase">The database to connect to</param>
        /// <param name="aUsername">The username to use to connect to the database</param>
        /// <param name="aPassword">The password to use to connect to the database</param>
        /// <returns>True on success, false otherwise.</returns>
        public static bool SetupIP2Location(int aCount, String aHost, String aDatabase, String aUsername, String aPassword)
        {
            sIP2LocPool = MySqlConnectionPool.CreatePool(aCount, aHost, aDatabase, aUsername, aPassword);
            if (sIP2LocPool != null)
            {
                sIP2LocPool.Name = "IP2Location";
            }

            return(sIP2LocPool != null);
        }