Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
Creating system dsn
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement