Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating system dsn
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Creating system dsn
Divers
Thread ID:
00702789
Message ID:
00702789
Vues:
43
i dont know what wrong, im trying to create a system dsn, is i use the part in comment, that the example is with vfp (or is i use connection to access) it works, but when i do it with the part not comment(for sql) does not work.
Can somebody tell me what is going on??????


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

***
* Create a string containing the settings appropriate to the driver.
***

settings= "DSN=PRUEBA;"+CHR(0)+;
"DRIVER={SQL Server};"+CHR(0)+;
"SERVER={desarrollo};"+CHR(0)+;
"DBQ=btwin;"+CHR(0)+;
"UID=sa;"+CHR(0)+;
"password =;"


*!* settings = "DSN=CA"+chr(0)+;
*!* "Description=VFP ODBC Driver"+chr(0)+;
*!* "SourceDB=C:\sistemas\cajajica\Data\cajajica.dbc"+chr(0)+;
*!* "SourceType=DBC"


crea_dsn=SQLConfigDataSource(0,4,"SQL Server",settings)&&EL 4 INDICA QUE ES UN SYSTEM DNS

IF crea_dsn = 1
MESSAGEBOX("it work")
ELSE
MESSAGEBOX("explotion")
endif
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform