Пример #1
0
 private void DisConnect()
 {
     if (null != m_nativeDBHelper)
     {
         m_nativeDBHelper.Dispose();
         m_nativeDBHelper = null;
     }
     //if (null != fnClearTree)
     //{
     //    fnClearTree();
     //}
 }
Пример #2
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);
        }