I needed a logon script to create some data sources (ODBC's) so I used ODBCCONF in a batch file that looked like this:
ODBCCONF CONFIGDSN "SQL Server" "DSN=DataSourceName| Description=| SERVER=DBhostnameorIP| Database=DB_name| Trusted_Connection=yes"This breaks down as follows:
ODBCCONF - The utility to run
CONFIGDSN - Configures a User DSN (CONFIGSYSDSN would be for a System DSN)
"SQL Server" - The driver to use
DSN= Data source name
Description= A description of the DSN
SERVER= DB host or IP address
Database= DB name
Trusted_Connection=yes (Use Windows NT authentication)
0 comments:
Post a Comment