Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing the DataSource of a Remote Connection?
Message
De
19/11/1999 13:16:20
Bob Lucas
The WordWare Agency
Alberta, Canada
 
 
À
18/11/1999 16:26:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00292718
Message ID:
00293165
Vues:
24
Hi Laurisa;

When I use remote data, my login screen has a drop down box of available DSN's (read from the registry). The user can select the DSN and then enter their user id and password.

These values are then used to upate the connection properties (I use only one, but you could do more) using DBSETPROP. You need to update three properties, the Datasource, Userid and Password.

Do this before you try to open any views. This allows you to connect to any datasource.

The only requirement here is that each user have their own local copy of the Database container, as each user may choose to log into a different database.


>Is there a way to programmatically change the DataSource of a Remote connection? I have a bunch of views set up that access a Connection to an Oracle database. I don't want to have to duplicate the views just to change the connection name from the one pointing at the production DSN to the one pointing at the test DSN. The application I'm working with has both a production and a test environment for regular Fox tables, but this is the first time we've added remote data (which also has a production and a test environment) into the mix.
>
>TIA!
>
>Laurisa Watkins
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform