I've got a program which needs to preview data which is stored in a variety of database formats. The user selects the file and then the program needs to open the database and read the headings and a sample of the data to display in a grid. If I were to use ODBC is there anyway to specify the DSN through code, or does the user have to go through the control panel to do this?

Cheers,
Craig.