Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Programmatically create SQL DSN
Message
De
20/06/2002 11:31:58
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Programmatically create SQL DSN
Divers
Thread ID:
00670662
Message ID:
00670662
Vues:
39
Hi,
I am trying to programmatically create a System DSN for a SQL database.
I need the Login Id to be sa, no password.

This code works: (but if I had LastUser=sa no DSN is created.)

DECLARE Integer SQLConfigDataSource in odbccp32.dll Integer, Integer,;
String, String

settingsAdd="DSN=HEAT64PROD"+chr(0)+;
"Desc=HEAT 6_4 Production Database"+chr(0)+;
"Server=NPBSQL2K1"+CHR(0)+;
"Database=HEAT6_4PROD"

lnSuccess = SQLConfigDataSource(0, 4, "SQL Server", settingsAdd)


If I add "LastUser=sa", no System DSN gets created.

Has anyone tried doing something similar ? THANKS !
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform