Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing the connectname (data source) of a Remote View?
Message
De
17/11/1999 12:57:20
Bob Lucas
The WordWare Agency
Alberta, Canada
 
 
À
17/11/1999 09:14:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00291854
Message ID:
00291997
Vues:
26
Hi Michel;

What I do in this scenario is this. On my login page I display a list of available ODBC Connections (I normally work with SQL Server so I display only the DSN's that are SQL Server. I use API calls to get the list from the registry.) In your case it would be a combo box with BOPDEV and BOPTEST as options.

After selecting the DSN, the user enters userid and password. Of course this should match to the database.

Each user has their own copy of the DBC (automatically updated to the user machine if it is changed). When they log in, I change the properties of the single connection I use in the dbc for the remote views. I update the connections datasource, userid and password.

Now when a view is opened, the user will be connected to the database they chose.

Using DBSETPROP you just need to update three properties, the Datasource, userid and password (assuming the userid and password are different for different databases).



>Hi,
>
>we have a database with a number of remote views. The data source is an ODBC connection to an Oracle server - let's call the data source BOPDEV. The clients have setup another Oracle base for testing, let's call the ODBC data source BOPTEST.
>
>What we would like to do is set up two separate environments - one for development (using BOPDEV) and one for testing (using BOPTEST). However, when trying to setup the "testing" environment, merely changing the database connection from BOPDEV to BOPTEST doesn't do any good - the remote views still want to use BOPDEV. The ConnectName property is read-only, and the MODIFY VIEW dialog doesn't allow it to be changed either.
>
>So the question is: is there a way to alter the connectname for a remote view without deleting and recreating it? (we have a good number of remote views). We would also like to avoid just changing the database in the ODBC source (by going to ODBC admin) since there is the chance of forgetting to change it back as we switch environments.
>
>Any help is greatly appreciated!
>
>thanks,
>Michel
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform