General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Programmatically create SQL DSN
Hi,
I am trying to programmatically create a System DSN for a SQL database.
I need the Login Id to be sa, no password.
This code works: (but if I had LastUser=sa no DSN is created.)
DECLARE Integer SQLConfigDataSource in odbccp32.dll Integer, Integer,;
String, String
settingsAdd="DSN=HEAT64PROD"+chr(0)+;
"Desc=HEAT 6_4 Production Database"+chr(0)+;
"Server=NPBSQL2K1"+CHR(0)+;
"Database=HEAT6_4PROD"
lnSuccess = SQLConfigDataSource(0, 4, "SQL Server", settingsAdd)
If I add "LastUser=sa", no System DSN gets created.
Has anyone tried doing something similar ? THANKS !
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