public bool checkConnectionInfo(string strServer, string strDatabase, string strUserName, string strPassword) { EzSql2 EzSQL = null; try { EzSQL = new EzSql2(strServer, strDatabase, strUserName, strPassword); EzSQL.open(); EzSQL.close(); return true; } catch { EzSQL.close(); return false; } }
public bool TestConnection() { //HPA.Component.Framework.CRunableObjectManager objManager = new HPA.Component.Framework.CRunableObjectManager(); EzSql2 EzSQL = null; try { EzSQL = new EzSql2(m_strServer, m_strDatabase, m_strUser, m_strPassword); EzSQL.open(); EzSQL.close(); return true; } catch { EzSQL.close(); return false; } }