Example #1
0
        // Returns a list of data source names from the local machine.
        public static List <string> GetAllDataSourceNames()
        {
            // Get the list of user DSN's first.
            var dsnList = GetUserDataSourceNames();

            // Get list of System DSN's and add them to the first list.
            var systemDsnList = GetSystemDataSourceNames();

            var res = new HashSetEx <string>();

            res.AddRange(dsnList);
            res.AddRange(systemDsnList);
            return(new List <string>(res));
        }