create cursor datasource (sourcename c(50), sourcedesc c(100), count n(3)) ODBCFILEHANDLE=FOPEN("C:\WINDOWS\ODBC.INI") IF ODBCFILEHANDLE < 1 THEN WAIT WINDOW "Can't open odbc file. Can't find c:\windows\odbc.ini. Call Todd." return endif found_start_point = .f. do while !found_start_point and !feof(odbcfilehandle) found_start_point = fgets(odbcfilehandle) # '[ODBC 32 bit Data Sources]' enddo if feof(odbcfilehandle) then wait window "Can't find ODBC section of c:\windows\odbc.ini. Call Todd." return endif modbcline = space(20) m.count = 999 do while !feof(odbcfilehandle) odbcline = fgets(odbcfilehandle) if odbcline = '[ODBC 32 bit Data Sources]' then loop endif if odbcline = '[' then exit endif msourceequalpos = at("=", odbcline) m.sourcename = left(odbcline, msourceequalpos - 1) m.sourcedesc = substr(odbcline, msourceequalpos + 1) insert into datasource from memvar m.count = m.count - 1 enddo public datasource[1] select * from datasource where sourcename # [ ] order by count into array datasource use in datasource mclose = fclose(odbcfilehandle) if !mclose then wait window "Can't close ODBC file. Call Todd." return endif>Hey, all: