Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating system dsn
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Creating system dsn
Miscellaneous
Thread ID:
00702789
Message ID:
00702789
Views:
42
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
Map
View

Click here to load this message in the networking platform