jeffrey.demulling at usbank.com
jeffrey.demulling at usbank.com
Thu Jun 5 14:23:48 CDT 2003
or you can you can use your code and do the following: Do Until rsData.EOF = True DoCmd.TransferDatabase acLink, "Microsoft Access", mylocation & myfile, acTable, mytable, mytable rsData.MoveNext Loop "Christopher Hawkins" <clh at christopherhawkins.com> Sent by: accessd-bounces at databaseadvisors.com 06/05/2003 02:06 PM Please respond to accessd To: accessd at databaseadvisors.com cc: Subject: [AccessD] Fast back-end relinking? First off: I have seen (and used) Tribble's Back-End relinker before. That's not what I need in this case. I have inherited an app with some back-end relinking code that is very slow. I've seen programmatic implementations of a table link that linked up very quickly, as quickly as using File > Get External Data > Link Tables. The one I'm dealing with takes many times as long. There is a table in my db called tblTable. It contains the name and path of every table in the database. The table is used in the following code: ***START*** Dim db As DAO.Database Dim tbl As DAO.TableDef Set db = CurrentDb Dim rsData As DAO.Recordset Set rsData = db.OpenRecordset("SELECT * FROM tblTable") rsData.MoveFirst Do Until rsData.EOF = True Set tbl = db.CreateTableDef(rsData("TableName")) Debug.Print "Now attaching " & tbl.Name & "..." tbl.Connect = (";DATABASE=" & rsData("Path")) tbl.SourceTableName = rsData("TableName") db.TableDefs.Append tbl rsData.MoveNext Loop db.Close ***END*** All the lag takes place when running the 'db.TableDefs.append tbl' line. Is there any way to speed this process up? I've seen it done more quickly before, I just didn't get to see the actual code. :( -Christopher- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030605/839a8e48/attachment-0001.html>