Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Programmatically creating a File DSN
Message
De
28/06/2001 01:45:43
Gavin Reid
L & M Marketing Pty Ltd
Frenchs Forest, Australie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00524501
Message ID:
00524516
Vues:
18
G'Day Andrew,

Of course, how simple. It didn't occur to me that a .DSN file was just an .INI type file.

Thanks Mate,
Gavin...

>Hi Gavin,
>
>This just seems to be a text file in .ini format. Here's one I created earlier (to get to a SQL server):
>
[ODBC]
>DRIVER=SQL Server
>;UID=sa
>DATABASE=JIWA
>WSID=T7020CT
>APP=Test
>SERVER=.
>Description=Local
>Trusted_Connection=True
>The files live (in my case) in the C:\Program Files\Common Files\ODBC\Data Sources>/tt> folder. I guess there's an API call to find out what that folder is. OTOH, maybe it doesn't matter where the DSN file lives, just as loong as you can provide and explicit, known path to it.
>Here's an Access file DSN I just created:
>
[ODBC]
>DRIVER=Microsoft Access Driver (*.mdb)
>UID=admin
>UserCommitSync=Yes
>Threads=3
>SafeTransactions=0
>PageTimeout=5
>MaxScanRows=8
>MaxBufferSize=2048
>FIL=MS Access
>DriverId=25
>DefaultDir=C:\Program Files\Microsoft Office\Office10\Samples
>DBQ=C:\Program Files\Microsoft Office\Office10\Samples\Northwind.mdb
>
>HTH
>
>Cheers,
>
>Andrew
>
>>Hi All,
>>
>> I know how to set up a File DSN through the ODBC Data Sources in the Control Panel, but does anyone know how to create a File DSN Programmatically with VFP code? I'm assuming that it'll need to be done via an API function. I would like to programmatically create File DSNs for ACCESS 2000 Databases and VFP6.0 Databases.
>>
>>Thanks,
>>Gavin...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform