ODBC Fail for Pass-Through Query

jarett

Board Regular
Joined
Apr 12, 2021
Messages
87
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
In access I can link a table with the ODBC connection I have setup for this DB, everything seems fine with the table, looks like records are being updated. However, when I go to setup a pass-through query I have to select the ODBC connection again but it gives me this error.

1620166199374.png


When I go to the ODBC data sources and test the connection it says, which I am assuming means it's connected.
1620166266776.png
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

james_lankford

Well-known Member
Joined
Jan 11, 2009
Messages
1,181
to set up a passthrough query

go to the menu and select create / query design / query tools / design / passthrough
================

pass_through_1.png


================
you will get a window to type sql in and you should get a property sheet - you have to fill in the ODBC field in the property sheet with a connection string
================

pass_through_2.png


you can find examples here

for MS SQL Server the odbc connection string looks like this

so I would fill in the property sheet with
ODBC;Driver={SQL Server};Server=some_server_name;Database=AdventureWorks2017;Uid=some_user_id;Pwd=some_password;

then you run your query
 
Solution

Watch MrExcel Video

Forum statistics

Threads
1,132,645
Messages
5,654,556
Members
418,140
Latest member
ahepple86

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top