473,320 Members | 1,580 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Relink Queries From Old Server to New Server

Fellow experts,

I have a Access file which is outdated. My task is to relink the Access file to another Access file. The problem is I don't know how to relink them, tried this (https://support.office.com/en-us/article/Import-or-link-to-data-in-another-Access-database-095ab408-89c7-45b3-aac2-58036e45fcf6) but still not working. The error said Could not find file 'myOldServerFile.accdb', I want change that myOldServerFile.accdb to myNewServerFile.accdb. Please help me
Aug 15 '17 #1

✓ answered by NeoPa

The general approach is to cycle through the TableDefs (CurrentDb().TableDefs) ignoring those where the .Connect property is not a match for what you want to work on. For those that need to be changed set the property to match what it was before except for the name of the database that it points to. Once this has been done you can call the TableDef method .RefreshLink(). If all's been done correctly this will point the table to the new database. Once the cycle's been completed your whole database now points to the new database rather than the old one.

1 1807
NeoPa
32,556 Expert Mod 16PB
The general approach is to cycle through the TableDefs (CurrentDb().TableDefs) ignoring those where the .Connect property is not a match for what you want to work on. For those that need to be changed set the property to match what it was before except for the name of the database that it points to. Once this has been done you can call the TableDef method .RefreshLink(). If all's been done correctly this will point the table to the new database. Once the cycle's been completed your whole database now points to the new database rather than the old one.
Aug 19 '17 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Alan | last post by:
I'm new to ASP, so I'm sorry if this is a dumb question. I'm trying to log into our SQL Server using ASP. Here's what I've got so far. Set objConn=Server.CreateObject("ADODB.Connection")...
5
by: Grim Reaper | last post by:
My work let me put SQL Server 7.0 Enterprise Edition on my laptop. I have never setup a server from the beginning, so I am a little new at creating server groups. Alright, I am trying to create...
22
by: EP | last post by:
When running my asp.net hosting service (asp.net without IIS), on server 2003 with IIS not installed, I get the following when trying to process a request. "System.DllNotFoundException: Unable to...
2
by: Bernie Yaeger | last post by:
Is there a way - through the api - to get the name of a client's sql server server name and then use that as input to the connection object, such that even tho' my test server name is one thing,...
2
by: Mike | last post by:
Hi, I am strugling with a simple problem which I can't seem to resolve. I have an asp.net page which contains a server-control (flytreeview, which is a kind of a tree to be exact). The tree is...
0
by: phil.stollery | last post by:
Hi, I've currently setup a local user as described in: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT01.asp This users has been created on the remote...
2
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
3
by: Lee T. Hawkins | last post by:
I am having a number of problems over the last two full days trying to get an ASP.NET 2.0 application to connect to a SQL Server 2005 database... First off, I built this application w/ Visual...
1
by: Milan Grba | last post by:
Can anyone tell me what the load impact on the network when running desktop queries vs. server based queries. I am not sure this is the exact question i want to ask or if i asked it in the right way....
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.