What Is the Difference between a System DSN, a User DSN, a File DSN, Universal Data Link (UDL), and DSN-less Connection?
Primary Software: LabVIEW Toolkits>>Database Connectivity Toolset
Primary Software Version: 1.0
Primary Software Fixed Version: N/A
Secondary Software: N/A
What is the difference between a System DSN, a User DSN, a File DSN, Universal Data Link (UDL), and DSN-less connection?
There are many different database drivers (or providers) and also many ways of connecting to them. The table below list the five most common ways in which you can interact with a database provider.
System DSNs work for anyone using that system. For example, no matter who logs onto the machine, system DSNs can be seen by all users, and they are stored in the Local Machine section of the Registry.
User DSNs work only for a specific user on a machine. Therefore, if someone other than the person who created the user DSN logs onto that machine, then the User DSN will not show up. This DSN is stored in the Current User section of the Registry.
File DSNs are not stored in the Registry but rather in a file. That means you can store these DSNs to disk or network and use them on any machine or any user that has access to it.
National Instrument's Database Connectivity Toolkit uses OLE DB to communicate with the databases. If you use a DSN, then the commands must be translated from OLE DB to ODBC through the OLE DB Provider for ODBC. Therefore, it is more efficient, and recommended, to use UDLs as the method of connection with the toolkit if an OLE DB Provider is available for the Database.
DSN-less means that you don't use a DSN to store your connection information. Instead, you either prompt your user for it at run time (Query Analyzer is a good example) or store the equivalent information somewhere else such as the registry, an INI file, or even a table. If you truly need to provide a dynamic connection where the user will be connecting to a variety of different sources, DSN-less is definitely easier on the user. Many developers decide to use a DSN-less connection and just store the connection string in the registry, eliminating the need to make sure that a valid DSN for the application exists.
KnowledgeBase 2U2FII5A: Creating a DSN File To Communicate with Access Database in LabVIEW?
KnowledgeBase 2ST89LJY: Programmatically Creating and Registering a DSN in C++
KnowledgeBase 3OSAJHTJ: Programmatically Creating Universal Data Link (*.udl / UDL) Files
KnowledgeBase 2KFB4NOU: Creating a Microsoft Data Link file (.UDL) for Connecting to Microsoft Access in LabVIEW
Report Date: 10/08/2001
Last Updated: 01/02/2009
Document ID: 2E7GIDDT