Exemple #1
0
        /// <summary>
        /// 尝试连接
        /// </summary>
        /// <returns>是否成功</returns>
        public bool TryConnect()
        {
            if (string.IsNullOrEmpty(DBHost) || string.IsNullOrEmpty(DBUser))
            {
                return(false);
            }

            m_nativeDBHelper = new NativeDBHelper(DBHost, DBUser, DBPassword);
            bool bConn = m_nativeDBHelper.IsConnected();

            return(bConn);
        }
Exemple #2
0
 public bool IsConnect()
 {
     return(m_nativeDBHelper != null && m_nativeDBHelper.IsConnected());
 }