Create a DSN File to Use With LabVIEW Database Connectivity Toolkit

Updated Jul 14, 2020

Reported In

Software

  • LabVIEW Database Connectivity Toolkit
  • LabVIEW

Issue Details

I have a Microsoft Access database with which I want to communicate in LabVIEW through the Database Connectivity Toolkit. How do I create a Data Source Name (DSN) file for my database?

Solution

Below is a general guideline for creating DSN files. For more in depth information and information about 64-Bit ODBC Drivers, please check Microsoft's tutorial on how to Connect to an ODBC Data Source (SQL Server Import and Export Wizard).


For a User or System DSN

  1. Navigate to Control Panel»Administrative Tools»ODBC Data Sources (32-Bit).  In older versions of Windows this may be listed as Data Sources (ODBC).

  2. Select either the User DSN or System DSN tab.

  3. Select Add»Microsoft Access Driver (*.mdb, *.accdb)»Finish.

  4. Give it a Data Source Name and a good description.

  5. Choose the Select button in the Database field.

  6. Navigate to the location of your Access database and select OK.

  7. Select OK on the ODBC Microsoft Access Setup window.

  8. You should now see your DSN in the User/System Data Source window.

 

For a File DSN

  1. Navigate to Control Panel»Administrative Tools»ODBC Data Sources (32-Bit).  In older versions of Windows this may be listed as Data Sources (ODBC).

  2. Select the File DSN tab.

  3. Select Add»Microsoft Access Driver (*.mdb, *.accdb)»Next.

  4. Navigate to the DSN file you wish to use via the Browse button (the name of the file should have a .dsn file extension), or manually type in the file path. 

  5. Select Next»Finish.

  6. Choose the Select button in the Database field.

  7. Navigate to the location of your Access database and select OK.

  8. Select OK on the ODBC Microsoft Access Setup window.

  9. Select OK on the ODBC Data Source Administrator window.

  10. The DSN file should now be located in the location you specified in step 4.

You will now have created a DSN file that is able to be access in LabVIEW using the LabVIEW Database Connectivity Toolkit.