예제 #1
0
        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;
            }
        }
예제 #2
0
 public static string ConnectionString()
 {
     return(GlobalMsADO.ConnectionString(GlobalMsADO.ServerName, GlobalMsADO.DatabaseName));
 }