Very odd ODBC or Query error?

maverick1714

New Member
Joined
Jun 4, 2010
Messages
5
Hi

I have a problem with a excel document that gets external data from a MS SQL database.
The problem happened when we moved the database to another server. Excel gets the data via FileDSN which I updated but still I get the

“ 1004 run error” General ODBC error “ and VB editor points at the row:
Selection.QueryTable.Refresh BackgroundQuery:=False

I tracked the problem to one table i ny SQL database and the problem is that somehow excel adds a prefix to the query where it is supposed to get data.
It looks liike this:
user_logon.dbo.table1 dbo.table 2 dbo.table3....

why does it add the user_logon?

I have tried to change this without success. It does this only to the first table in the query list. All other tables are fine

I would appreciate any help I can get
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Forum statistics

Threads
1,224,609
Messages
6,179,876
Members
452,949
Latest member
Dupuhini

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
Back
Top