Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
 public bool IsConnect()
 {
     return(m_nativeDBHelper != null && m_nativeDBHelper.IsConnected());
 }