Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Configuring ODBC Connections
Message
De
30/01/2001 15:31:46
Dave Nantais
Light speed database solutions
Ontario, Canada
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00462621
Message ID:
00470304
Vues:
35
>This time with formatting.
>
>>>I have a VFP application that connects to an ACCESS97 database via ODBC.
>>>A client wishes to use this same VFP application to connect to 30 different ACCESS97 databases via ODBC on 12 different machines.
>>>
>>>This would mean configuring ODBC Connections 12*30 times.
>>>Is there a way to automatically configure an ODBC connection without performing the task manually in Windows using the control panel and the ODBC Data Source Administrator?
>>>
>>>Will some kind of WSH program work?
>>>
>>>
>>>Thanks In Advance.
>>
>>Why not use a DSN-less connection to access the Access MDB. Here is an example posted by JVP some time ago:
>lconnstr = 'DBQ=C:\Program Files\Microsoft Visual Studio\VB98\NWIND.MDB;'+;
>   'DefaultDir=C:\Program Files\Microsoft Visual Studio\VB98;'+;
>   'Driver={Microsoft Access Driver (*.mdb)};DriverId=281;'+;
>   'FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;'
>lnconn = sqlstringconnect(lcconnstr)
>>This way you can keep the conenction information in a table (or whereever) and add to it as needed.
>>
>>HTH.


I have got your suggested method working well on a couple of test machines.
Thanks for your help.

However, I do not understand how you arrived at DriverID = 281?
I have an understanding of every other element of the SQLSTRINGCONNECT command used.

Where can I find more information on this topic?

Help files and so on.


I examined MSDN 6 help and there was nothing that handled kind of SQLSTRINGCONNECT command you gave as an example.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform