Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Connections
Message
 
À
28/10/2004 10:01:45
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:
00955321
Vues:
18
Jim,
I just loged on to ask exactly this question Thaks for the promopt awnser.

Bernardo.

>Leroy,
>
> Thanks for the response. So are you saying that there isn't a way for the connection in the project to update when the ODBC connection is updated...?
>
>Jim
>
>>>>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.
B.D.H.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform