- write a VBA procedure that modifies the connection string of all linked tables in such a way that the user does not need a DSN
- write a VBA procedure that creates the necessary DSN
The funny thing is when you migrate an Access database to SQL server it automatically creates link tables that do not require a DSN!
Well, there is a way to achieve this without writing a little program in VBA:
- Open Administrative Tools - Data Sources (ODBC) aka Microsoft ODBC Administrator
- Create a File DSN there with all the connection parameters
- Go back to MS Access and use the File DSN you just created to link your tables, and voilá, they do not need a DSN!
If you already have linked tables that rely on a DSN, there is an easy way to fix this:
- follow steps one and two from above
- Open the Linked Tables Administrator
- select all tables and check the little box in the lower left corner, press OK
- when Access asks you for the DSN, just select the File DSN you created above
I am not sure whether this information already exists somewhere; I was not able to find it, I had to stumble upon the solution by accident. Even on Microsoft's pages I only found the programmatic approach.
Hope this helps someone out there!
No comments:
Post a Comment