Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating a user DSN
Message
 
À
19/07/2001 03:58:17
Fausto Garcia
Independent Developer
Lima, Pérou
Information générale
Forum:
Visual FoxPro
Catégorie:
Installation et configuration
Divers
Thread ID:
00532392
Message ID:
00532407
Vues:
20
Hi!
#define ODBC_ADD_DSN 1
#define ODBC_CONFIG_DSN 2
#define ODBC_REMOVE_DSN 3

Declare Long SQLConfigDataSource In ODBCCP32.DLL ;
   Long hwndParent, Long fRequest, String lpszDriver, String lpszAttributes

strDriver = "SQL Server"
strAttributes = "SERVER=SomeServer" + Chr(0)
strAttributes = strAttributes + "DESCRIPTION=Temp DSN" + Chr(0)
strAttributes = strAttributes + "DSN=DSN_TEMP" + Chr(0)
strAttributes = strAttributes + "DATABASE=pubs" + Chr(0)
strAttributes = strAttributes + "UID=sa" + Chr(0)
strAttributes = strAttributes + "PWD=" + Chr(0)
intRet = SQLConfigDataSource(0, ODBC_ADD_DSN, @strDriver, @strAttributes)
If intRet = 0
   MessageBox("DSN Create Failed")
EndIf
>How can I avoid creating a user dsn manually? Is there any way to create and configure it on install time?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform