![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, I've got this supposedly easy problem of redirecting all of the linked tables and pass-through queries from reading from production-database to test-database. Unfortunately I'm no real access-hero. The setup is the following: There's an access-2003 mdb-file containing lots of objects, some of which point to an oracle-database via an odbc- connection. Now I want all of the things accessing Oracle, namely linked tables and pass-through queries, to read from another database. So I redirected the ODBC data-source to point to the other database - only to realize that apparently the pass-through queries still read from the previous database - the connection information apparently being kept within the access-objects. This puzzled me. Now I've tried to programmatically update all connection-attributes. But still no sucess. So, please: can anybody give me a hint on how to induce all access- objects to use the current ODBC data-source settings and not the old settings. I want them all to read from my Oracle testdatabase and not from production database. thanks and regards, stephan |
#3
| |||
| |||
|
|
You need to update the connect property and then use the Refreshlink method So (short form) Dim db as DAO.Database Dim Tab as DAO.Tabledef Set DB = Currentdb For Each Tab in db.TableDefs With Tab If Len(.Connect) > 0 then .Connect = "Your new connect string" .RefreshLink End If End With Next -- Terry Kreft "steph" <stepha... (AT) yahoo (DOT) de> wrote in message news:2fb21b0d-e95b-404f-ad54-4431c8f2db1f (AT) s19g2000prg (DOT) googlegroups.com... Hello, I've got this supposedly easy problem of redirecting all of the linked tables and pass-through queries from reading from production-database to test-database. Unfortunately I'm no real access-hero. The setup is the following: There's an access-2003 mdb-file containing lots of objects, some of which point to an oracle-database via an odbc- connection. Now I want all of the things accessing Oracle, namely linked tables and pass-through queries, to read from another database. So I redirected the ODBC data-source to point to the other database - only to realize that apparently the pass-through queries still read from the previous database - the connection information apparently being kept within the access-objects. This puzzled me. Now I've tried to programmatically update all connection-attributes. But still no sucess. So, please: can anybody give me a hint on how to induce all access- objects to use the current ODBC data-source settings and not the old settings. I want them all to read from my Oracle testdatabase and not from production database. thanks and regards, stephan |
![]() |
| Thread Tools | |
| Display Modes | |
| |