John B. said:
I have moved old queries to a new server and the SQL database with the
linked
tables to the same server. Now when I run the I get an error advisory
<ODBC
-- connection to 'imis 10 failed>. The ODBC on the PC pointing to the SQL
database on the new server has been changed to reflect the new location.
How do I get the ACCESS query to see and use the new database
connectivity?
Hi John,
Unless my newgroup reader is letting me down
again, it looks to me like you have not received
a reply.....
one tends to shy away from questions such as above
because "queries/SQL database/linked tables/ODBC"
has so many "paths."
In my little world, I use DSN's and in my mdb's I
link to views/tables. Except for the passthrough queries
to stored procedures, all my other queries use the
linked views/tables.
If you are in a similar situation, then the solution is easy.
You need to delete the links and recreate them.
Actually, in all our mdb's, I have a combobox with
names of production and testing DSN's, and in the
after_update event of combobox, I run version of
Joe Fallon's code to delete the links and then recreate
them using a table ("tblODBCLinks"). This table has
2 fields:
'tblODBCTables
' LinkTableName Ex: "VW_GW_SOPOInfo"
' LinkIndex Ex: "TermID, PONumber, SKU"
If LinkTableName is a View, then the LinkIndex
is used to create a uniqueindex for the View.
If LinkTableName is a table, then LinkIndex
is left blank.
Joe's code also refreshes connection string for passthroughs.
Plus, in the end, I run code to "turn off subdatasheets"
using code from
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q261000
Besides switching between test and production server,
all the above code gets run when views get changed.
So.....
if your "queries/SQL database/linked tables/ODBC"
runs down this same "path,"
search Google Groups for
Joe Fallon relink SQL Server group:microsoft.public.access.*
to get code that will automatically do this...
or, just manually do it.