public static SqlConnection MainDataAccessConnection(bool openConnection) { try { if (mainDataAccessConnection == null || mainDataAccessConnection.State != ConnectionState.Open) { mainDataAccessConnection = new SqlConnection(GlobalMsADO.ConnectionString()); mainDataAccessConnection.Open(); } return(mainDataAccessConnection); } catch (Exception ex) { throw ex; } }
public static string ConnectionString() { return(GlobalMsADO.ConnectionString(GlobalMsADO.ServerName, GlobalMsADO.DatabaseName)); }