Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Connections
Message
 
À
25/10/2004 12:51:48
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
00953758
Message ID:
00954938
Vues:
13
>>Is there a way to have the connection within the project access the ODBC connection
>>properties. So if the ODBC connection changes the connection in the project would update?

What I would do is create a table (MyDSNs) with 2 fields in it, (THisMachine,DSNString).
Store your StringConnect information in there.
Keep that table on the network somewhere.

In your main program that opens up your database do this:
select myDsns
LOCATE FOR ThisMAchine = SomeName && This could be a variable, property or Method that returns the name that you need
myDSNString = DNSString

** Now you can set the property of the database connection
open Database myDatabase
myConnection = 'My Connection Name in the Database'
DBSETPROP(myConnection,"CONNECTION","CONNECTSTRING",myDSNString)
This way you can have as many dsns as you want and just look for the DSN that you want.
Hope this helps.
What is Wisdom?
Wisdom - The ability to respond to any situation according to God's Plan.
Therefore:
USE Wisdom IN Everything ORDER priority AS Knowledge
SELECT Knowledge
BROWSE FOR Understanding WHERE Wisdom=Guide

LeRoy Jackson
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform