>

RefreshLink Method

Applies To

TableDef Object.

Description

Updates the connection information for an attached table.

Syntax

tabledef.RefreshLink

The tabledef placeholder specifies the TableDef object representing the attached table whose connection information you want to update.

Remarks

You change the connection information for an attached table by resetting the Connect property of the corresponding TableDef object and then using the RefreshLink method to update the information. When you use RefreshLink, the attached table's properties and Relation objects aren't changed.

To force this connection information to exist in all collections associated with the TableDef object that represents the attached table, you must also use the Refresh method on each collection.

See Also

Connect Property, Refresh Method.

Example

This example attaches a Paradox table named PDX_Author to a database opened for exclusive use, moves the connection to a different directory, and then refreshes the connection information.


Dim dbsPublishers As Database, tdfPDX_Author As TableDef
' Open database.
Set dbsPublishers = DBEngine.Workspaces(0).OpenDatabase _
("C:\CONTACTS\Biblio.mdb") Set tdfPDX_Author = dbsPublishers.CreateTableDef _
("PDX_Author", dbAttachExclusive) tdfPDX_Author.SourceTableName = "Author" tdfPDX_Author.Connect = "Paradox 3.x; " _
& "DATABASE=C:\PDX\PUBS; PWD=books" ' Append to TableDefs collection. dbsPublishers.TableDefs.Append tdfPDX_Author ' Move to new directory. dbsPublishers.TableDefs!PDX_Author.Connect = "Paradox 3.x; " _
& "DATABASE=N:\PDX\PUBS; PWD=books" ' Refresh connection information. dbsPublishers.TableDefs!PDX_Author.RefreshLink