Pass-thru query ODBC error

Darrell Burns 121 Reputation points
2021-02-14T17:12:28.873+00:00

I have a DSN that connects my Access database to a SQL Server database called "Hotlist". I then created a pass-through query that works fine when I apply the DSN interactively, but throws an ODBC-Connection Failed error when I run the same query with the DSN embedded in a connection string.
Any ideas why?
Thanx in advance!

67797-passthruquery-odbc-error.png

Microsoft 365 and Office | Access | Development
0 comments No comments

2 answers

Sort by: Most helpful
  1. Darrell Burns 121 Reputation points
    2021-02-15T18:08:17.963+00:00

    Thanks Albert. You're the best.

    Funny thing is, I use DSN-less links on all my Access apps but somehow I got in the (bad) habit of using DSNs in Pass-Thru queries. Through trial & error I did find the solution after I posted the question, which was to use my standard connection string to that database without the DSN. So that corroborates your recommendation.

    Thanx!

    Was this answer helpful?


  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.