Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programmatically create SQL DSN
Message
From
20/06/2002 11:31:58
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Programmatically create SQL DSN
Miscellaneous
Thread ID:
00670662
Message ID:
00670662
Views:
40
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
Map
View

Click here to load this message in the networking platform