General information
Category:
Coding, syntax & commands
Title:
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only