Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Assigning a connection name on the fly
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00451337
Message ID:
00451359
Vues:
22
>I am connecting to an Access database through ODBC. I have remote views setup inside a standard VFP database.
>
>My question is, is there a way to change the connect name on the fly. There doesn't appear to be a way to to this as the name is stored in the DBC and the 'ConnectName' option within dbsetprop() is a read-only property.
>

Nope, you have to redefine the view to change the connection. FWIW, the USE command in VFP7 has an optional clause that lets you define which connection to use when opening the view.

If you decide to redefine the entire view on the fly, you might want to check out EView here in the files section- it will generate code from your view that can be used to recreate the view. You could even modify that code to take a parameter for the connection to use. Be aware that redefining a view on a regular basis will contribute to DBC bloat.
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform