Is there an easy way to create a DSN-less connection to a database?
Steps to Create a DSN-Less Connection String for your Access and SQL Server database(s) using some nice windows features.
- Right-Click the desktop.
- Select New
- Select New Text File
- Give it a unique name
- Change the extension to "UDL" (Stands for Universal Data Link)
- Double-Click the file
- Walk through the wizard and test the connection.
- Click Finish to Save it to the file.
- Open the file in notepad.
- Copy the string that is written after the line 'Everything after this line is... etc'. This is your dsn-less connection to be used in your connection settings!
For Access databases you will need to remove the part of the physical drive location with where your database resides on our web server:
You have uploaded a database named "test.mdb" to a folder that hangs off the root of your account named "Database".
So you need to replace the file path with: