Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Linking Access Tables using VB
Message
De
29/05/2001 15:03:19
 
 
À
29/05/2001 13:26:06
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00512304
Message ID:
00512358
Vues:
17
>I'm looking for a way to relink an access table using vb. I have it working in Access using the DoCmd.TransferDatabase. Does anyone have a way to do this?
>
>The reason I need to be able to do this is that I make modifications in an mdb that links to tables in either a Test database or the live database. I need a way to switch between them through VB code so that when a user logs on based on a registry entry it will relink to either the live data or production.
>
>Any help would be greatly appreciated.
>
>Nichole Brelje

If the links exist already, you can change table links by using the tabledefs collection:
thisdb.TableDefs(0).Connect = "FoxPro 2.6;DATABASE=" & strNewConn
thisdb.TableDefs(0).RefreshLink
thisdb.TableDefs.Refresh
Where thisdb refers to the opened MDB database and strNewConn has the path to the new source.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform