public rwDB() { try { string strConn = string.Empty; conn = new DBCommand(); strConn = ConfigurationManager.ConnectionStrings["ConnStr"].ToString(); conn.ConnectionString = strConn; conn.DataBaseDriverType = enmDataAccessType.DB_MSSQL; conn.Open(); bConnected = conn.Connected; } catch (System.Exception ex) { string strErr = ex.Message; bConnected = false; } }
public rwDB() { try { string strConn = string.Empty; strConn = ConfigurationManager.ConnectionStrings["ConnectStr"].ToString(); conn = new DBCommand(); conn.ConnectionString = strConn; conn.ConnectionString = @"Server=Localhost;Integrated Security=True;DataBase=lydxDB;"; conn.DataBaseDriverType = enmDataAccessType.DB_SQL; conn.Open(); bConnected = conn.Connected; } catch (System.Exception ex) { string strErr = ex.Message; } }