473,804 Members | 2,933 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Relinking Tables - Access 2003

I was uaing some code derived from the Northwind database to relimk tables at
startup.

The code works well in accerss 97/2000, but does not in 2003

Does anyone have any references to a Relinker in Access 2003?

Thanks - AB
Nov 13 '05 #1
1 2214
"ABinBoston " <ab********@aol .com> wrote in message
news:20******** *************** ****@mb-m01.aol.com...
I was uaing some code derived from the Northwind database to relimk tables
at
startup.

The code works well in accerss 97/2000, but does not in 2003

Does anyone have any references to a Relinker in Access 2003?


Try this:
--------------------------------------------------
Private Sub Command0_Click( )
Dim db As Database, n As Integer, i As Integer
Dim TFileName As String, LinkedTable As TableDef
Dim LocalTableName( ) As String, TableArray() As String
Set db = CurrentDb

' External database
TFileName = "C:\JollyServic e_2004\JollySer vice_T.mdb"
DoCmd.Hourglass True
n = 4
ReDim TableArray(1 To n)

' Tables existing on external database
TableArray(1) = "t_UM"
TableArray(2) = "t_IVA_Aliq "
TableArray(3) = "t_Trasport i"
TableArray(4) = "t_CT"
ReDim LocalTableName( 1 To n)

' Names you want to assign to linked tables
LocalTableName( 1) = "T1"
LocalTableName( 2) = "T2"
LocalTableName( 3) = "T3"
LocalTableName( 4) = "T4"

' If you want to link external tables with their
' external names use the REMed Set LinkedTable
' instead of the other one.
For i = 1 To n
Set LinkedTable = db.CreateTableD ef(LocalTableNa me(i))
'Set LinkedTable = db.CreateTableD ef(TableArray(i ))
LinkedTable.Con nect = ";DATABASE= " & TFileName
LinkedTable.Sou rceTableName = TableArray(i)
db.TableDefs.Ap pend LinkedTable
Next i
db.TableDefs.Re fresh
DoCmd.Hourglass False
End Sub
---------------------------------------------------------------
Bruno
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
6788
by: Andreas Lauffer | last post by:
I changed from Access97 to AccessXP and I have immense performance problems. Details: - Access XP MDB with Jet 4.0 ( no ADP-Project ) - Linked Tables to SQL-Server 2000 over ODBC I used the SQL Profile to watch the T-SQL-Command which Access ( who creates the commands?) creates and noticed:
4
2076
by: Ray | last post by:
I have a split DB running on a network, with code to relink to tables on launch of the client is they are broken. Usually, this works fine, but for some reason just hangs if another user is using the system. Any idea why and what I can do about it? Ray
6
2538
by: Don Leverton | last post by:
Hi All, I've got a situation where I am developing an Access 97 app for a client, and am in the "beta testing" stage. I have split the app up, using the DB splitter, into front-end /back-end for the usual reason ... so I can mess with form/report revisions. Since splitting, I've had issues with re-linking the tables ... as it relates to the completetely different "My Documents" data paths on several different Win98 / Win XP computers.
1
1660
by: Zlatko Matiæ | last post by:
Is there any common method for programatical relinking of linked tables?
2
7849
by: Randy | last post by:
I am trying to relink some Oracle tables in an Access database via VB.NET and ADOX. I receive the following error when executing the cat.ActiveConnection link "Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another. Here is my code Dim cat As ADOX.Catalog = New ADOX.Catalo Dim tbl As ADOX.Tabl Dim OracleConn As String = "Provider=MSDAORA.1;Data Source=xzy;User ID=xyz;Password=xyz
23
2381
by: cmd | last post by:
I use the following code (behind a command button on the FE) to relink from a user's local copy of the BE to the file-server's BE on our LAN. I use this, for example, when a person brings in their laptop and connects to our LAN. The code works fine if there are no other users accessing the server's BE at the time. If the file-server's BE is open at the time, however, then the relinking process does not finish -- it just pauses. When...
1
1650
by: shumaker | last post by:
I just need to know gnerally what commands/api I would need to look up documentation for, if this can be done at all. I have some users who take copies of an Access database home with them to do analysis. I am going to split the database however, and that means that they will have to copy the backend and then relink to that local copy in their frontend when they are not on the network. In other words, manually: Copy backend to local...
13
4522
by: Arno R | last post by:
Hi all, I am deploying an A2k app to users with different versions of Access. Using Access 2000 the relinking on startup (on deploying a new frontend or when backend has changed) is very fast. It takes about 4-5 seconds to relink some 50 tables. (I am relinking, not refreshing) Using Access 2003 the relinking is very slow compared with Access 2000. Now It takes about 1,5 to 2 minutes !! to relink the same 50 tables. I am testing...
0
2264
by: jrhowcroft | last post by:
I have a number of databases in MS Access 97. Some tables in these databases are linked to ODBC tables in Oracle9/10. We would like to change the user name and password on the Oracle tables so each database in MS Access linking to the tables in Oracle will need to be relinked with the new credentials. We would also like to automate this process of dropping the old links and making a new one through a module that can be run in every database....
0
9705
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10323
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10311
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10074
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9138
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7613
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4292
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3813
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2988
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.