Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Multiuser / Networking / February 2005

Tip: Looking for answers? Try searching our database.

Fast linking of multiple tables to a back end MDE

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rick Roberts - 13 Jan 2005 02:35 GMT
When initially linking over 50 tables within a client MDE to a server MDE
using VBA / Access 2003 it takes an amazing amount of time.  I am successful
using either the docmd method or the ADOX method.  The problem is that it
takes quite a bit of time (1-3) minutes to perform this task.  I think this
is because it opens and closes the Server mde for each individual table link,
which in my case would be a ton of wasted overhead.

If I use the manual method of File > Get External Data > Link  Tables >
Select All Files, the time is cut down to 10-15 seconds.  So there must be a
better way! Is anyone aware of a fast version using VBA.  Is there a way to
open/close the Server MDB and perform all the Links in one pass?

I would appreciate anyone’s opinion/help on this issue.

These are the two methods I have used

DoCmd Method
   DoCmd.TransferDatabase acLink, "Microsoft Access", FullServerName,
acTable, TableName, TableName

ADOX Method                
Set tblLink = New ADOX.Table
With tblLink
        ' Name the new Table and set its ParentCatalog property to the
               ' open Catalog to allow access to the Properties collection.
               .Name = TableName
               Set .ParentCatalog = cat1
           
               'Set the properties to create the link.
               .Properties("Jet OLEDB:Create Link") = True
               .Properties("Jet OLEDB:Link Datasource") = FullServerName
               .Properties("Jet OLEDB:Remote Table Name") = StrLinkTable
           End With
           ' Append the table to the Tables collection.
           cat1.Tables.Append tblLink
david epsom dot com dot au - 17 Jan 2005 08:06 GMT
You don't show what you are doing with new table after creating the link.

In the first method, you should open the first link you create, and leave
it open until you are finished linking

In the second method, you might be able to just use a table object with
a link data source or with a catalog open against the link data source
- otherwise, open a table as for method 1, and leave it open until you
are finished linking.

(david)

> When initially linking over 50 tables within a client MDE to a server MDE
> using VBA / Access 2003 it takes an amazing amount of time.  I am successful
[quoted text clipped - 31 lines]
>             ' Append the table to the Tables collection.
>             cat1.Tables.Append tblLink
Rick Roberts - 14 Feb 2005 11:57 GMT
I found that the best answer in ADO is to leave the catalog to the BE open.  
That along with turning off Name AutoCorrect has made this a non issue.

Thanks to all!

> You don't show what you are doing with new table after creating the link.
>
[quoted text clipped - 49 lines]
> >             ' Append the table to the Tables collection.
> >             cat1.Tables.Append tblLink
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.