Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating a DSN in code.
Message
De
04/02/2008 17:13:39
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
04/02/2008 12:13:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
01289107
Message ID:
01289333
Vues:
15
>I am looking for a way to create a system DSN via code. We are migrating to SQL server. Currently, we will be pulling static history from SQL server for reports. To aid in the upgrading, I am looking for a way to generate the ODBC System DSN.

DSN is a textfile. Here's a sample:

[ODBC]
DRIVER=SQL Server
UID=sa
DATABASE=pubs
WSID=%COMPUTERNAME%
APP=Microsoft(R) Windows NT(R) Operating System
SERVER=(local)
Description=Object Pooling Bank Application DSN

The whole difference between a connect string and DSN is that string is a string and a file is a file, one uses semicolon for a delimiter, the other uses CR. In Fox, conversion between the two fits one line (well, one line one way, one more line to reverse).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform