Others

How to Understand DSN and DSN-Less Access Links to SQL Server

Khadija KhanKhadija Khan Nov 4, 2026 869 views

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.

How to Understand DSN and DSN-Less Access Links to SQL Server
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.
Before you start

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.

Solution 1Recommended

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.

1
Open MS Access

Launch your Microsoft Access application and open the database containing the linked SQL Server tables.

2
Create a New Query

Navigate to the 'Create' tab on the ribbon and click on 'Query Design'. Close the 'Show Table' dialog without adding any tables.

3
Switch to SQL View

Right-click the query tab and select 'SQL View' from the context menu.

4
Run Inspection Query

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.

5
Update Table Links via VBA

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.

Inspect and Relink Using DSN-less Connections
Caution: Never directly edit the MSysObjects system table. Always use VBA TableDef objects or the Linked Table Manager (with File DSNs converted to DSN-less) to modify the Connect property.
Free Microsoft Office alternative

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. 1. Download the Installer: Visit the official WPS Office website and download the free installer for your operating system.
  2. 2. Install WPS Office: Run the setup file and follow the on-screen instructions to complete the fast installation process.
  3. 3. Open Your Documents: Launch WPS Office and effortlessly open, edit, and save your existing Office files with full format compatibility.
100% compatible with Microsoft Word, Excel, and PowerPoint formats.Lightweight installation with blazing fast performance on any device.Familiar user interface requiring zero learning curve for seamless migration.Built-in PDF editing and AI-powered tools for enhanced productivity.
microsoft office alternative - wps office

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.