>I am looking for a way to create a system DSN via code. We are migrating to SQL server. Currently, we will be pulling static history from SQL server for reports. To aid in the upgrading, I am looking for a way to generate the ODBC System DSN.
DSN is a textfile. Here's a sample:
[ODBC]
DRIVER=SQL Server
UID=sa
DATABASE=pubs
WSID=%COMPUTERNAME%
APP=Microsoft(R) Windows NT(R) Operating System
SERVER=(local)
Description=Object Pooling Bank Application DSN
The whole difference between a connect string and DSN is that string is a string and a file is a file, one uses semicolon for a delimiter, the other uses CR. In Fox, conversion between the two fits one line (well, one line one way, one more line to reverse).