How to Understand DSN and DSN-Less Access Links to SQL Server
Question details
The user needs to understand why newly linked SQL Server tables using a DSN only work for the creator, whereas the original links worked for everyone using DSN-less connections.

- Product
- Microsoft Access / SQL Server
- Device & OS
- not provided
- Scenario
- Relinking SQL Server tables in a copied MS Access application.
- Observed behavior
- DSN-linked tables are user-specific and fail for other users on different machines, while original DSN-less connections functioned universally without relying on local DSN configurations.
Ensure you have adequate permissions to access the SQL Server database and that you back up your Access frontend application before modifying table links or connection strings.
Inspect and Relink Using DSN-less Connections
Identify existing connection strings and switch to DSN-less connections to ensure application portability across different users.
DSN-less connections embed the SQL Server connection details directly within the Access database. This prevents the need to configure a local ODBC Data Source Name (DSN) on every user's computer.
When an application uses a User DSN, the connection is restricted to the Windows user profile that created it. Transitioning to a DSN-less connection string guarantees that anyone opening the frontend can connect to the backend SQL Server seamlessly.
Launch your Microsoft Access application and open the database containing the linked SQL Server tables.
Navigate to the 'Create' tab on the ribbon and click on 'Query Design'. Close the 'Show Table' dialog without adding any tables.
Right-click the query tab and select 'SQL View' from the context menu.
Paste the following SQL statement: SELECT MSysObjects.Name, Connect FROM MSysObjects WHERE Connect Is Not Null; and click 'Run' to view your current connection strings.
To implement DSN-less connections, create a VBA module to loop through your TableDefs and update the .Connect property with a full connection string (e.g., Driver={SQL Server};Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;) and call the .RefreshLink method.

Explore WPS Office for Your Daily Productivity Needs
While Microsoft Access is tailored for managing complex SQL databases, you can rely on WPS Office as a free, lightweight, and powerful alternative for all your documents, spreadsheets, and presentation needs.
- 1. Download the Installer: Visit the official WPS Office website and download the free installer for your operating system.
- 2. Install WPS Office: Run the setup file and follow the on-screen instructions to complete the fast installation process.
- 3. Open Your Documents: Launch WPS Office and effortlessly open, edit, and save your existing Office files with full format compatibility.

Frequently Asked Questions
What is the main difference between a DSN and a DSN-less connection?
A DSN (Data Source Name) relies on configuration files or registry settings stored on the local computer to hold connection details. A DSN-less connection embeds the entire connection string directly into the application code or table properties, making the database highly portable across different machines.
Why do my DSN-linked tables only work for me?
If you created a 'User DSN', the connection settings are only accessible to your specific Windows user profile. To share the connection with other users on the same machine, you would need a 'System DSN'. To share it across different computers, a DSN-less connection is the best approach.
Can I use the Linked Table Manager for DSN-less connections?
The native Linked Table Manager in MS Access typically relies on DSNs or File DSNs. To strictly implement and manage DSN-less connections, developers usually use a VBA script to dynamically loop through TableDefs and update the Connect property.




