W
Wayne
I have several access 2003 databases. We're using a file-dsn for connecting
to the sql server for the linked tables within it (so we can update all users
in one spot when we move from production to failover servers (which we do a
week-long quarterly test)).
However, the linked tables keep the connection information for when the
tables were added. I'm trying to automate this.
I was trying to put the following code in the form_open event:
Private Sub Form_Open(Cancel As Integer)
Dim tdfCurrent As DAO.TableDef
For Each tdfCurrent In DBEngine.Workspaces(0).Databases(0).TableDefs
tdfCurrent.RefreshLink
Next
This is generating the following error on the tdfCurrent.RefreshLink line:
Run-time error '3151':
ODBC--connection to <name> failed.
Can you help me get this working?
BTW, I'm a SQL DBA, not an Access programmer, so don't assume I know
anything about Access. I might need a little bit of help understanding.
Thanks,
Wayne
to the sql server for the linked tables within it (so we can update all users
in one spot when we move from production to failover servers (which we do a
week-long quarterly test)).
However, the linked tables keep the connection information for when the
tables were added. I'm trying to automate this.
I was trying to put the following code in the form_open event:
Private Sub Form_Open(Cancel As Integer)
Dim tdfCurrent As DAO.TableDef
For Each tdfCurrent In DBEngine.Workspaces(0).Databases(0).TableDefs
tdfCurrent.RefreshLink
Next
This is generating the following error on the tdfCurrent.RefreshLink line:
Run-time error '3151':
ODBC--connection to <name> failed.
Can you help me get this working?
BTW, I'm a SQL DBA, not an Access programmer, so don't assume I know
anything about Access. I might need a little bit of help understanding.
Thanks,
Wayne