G
Guest
I want to create a system or user DSN for an Access database without having to go through the wizard available in the ODBC Data Source Administrator tool (in the Start->Control Panel->Administrative Tools->Data Sources)
I went through the discussions regarding this and found ways to do this for setting up DSNs for SQL Server or MySql using the odbcconf command (code snippets are attached below). Following the SQL Server example, I can set up a DSN using the command
odbcconf configsysdsn "Microsoft Access Driver (*.mdb)" "DSN=Test_DSN
But I am not able to select or create a .mdb file that is associated with this DSN. I still have to go to the Data Source Administrator tool to associate a mdb file with the DSN. Is there any way I can supply more data to the odbcconf command to select or create a new .mdb file for the DSN
Thanks.
-kesha
SQL Server -
odbcconf configsysdsn "SQL Server" "DSN=test1|SERVER=(local)
For MySql - use the odbcconf command with a config file in this wa
"odbcconf /f myodbc.rsp
where the myodbc.rsp file contains the followin
INSTALLDRIVER "MySQL Driver|Driver=myodbc.dll|Setup=myodbc.dll||
CONFIGDRIVER "MySQL Driver" "APILevel=2
CONFIGDRIVER "MySQL Driver" "ConnectFunctions=YYN
CONFIGDRIVER "MySQL Driver" "DriverODBCVer=2.50.40
CONFIGDRIVER "MySQL Driver" "FileUsage=0
CONFIGDRIVER "MySQL Driver" "FileExtns=*.txt
CONFIGDRIVER "MySQL Driver" "SQLLevel=1
CONFIGDRIVER "MySQL Driver" "CPTimeout=60
CONFIGDSN "MySQL Driver" "DSN=sample-MySQL;Description=MySQL ODB
Driver;SERVER=database_server;User=odbc;DB=test;Port=3306||"
I went through the discussions regarding this and found ways to do this for setting up DSNs for SQL Server or MySql using the odbcconf command (code snippets are attached below). Following the SQL Server example, I can set up a DSN using the command
odbcconf configsysdsn "Microsoft Access Driver (*.mdb)" "DSN=Test_DSN
But I am not able to select or create a .mdb file that is associated with this DSN. I still have to go to the Data Source Administrator tool to associate a mdb file with the DSN. Is there any way I can supply more data to the odbcconf command to select or create a new .mdb file for the DSN
Thanks.
-kesha
SQL Server -
odbcconf configsysdsn "SQL Server" "DSN=test1|SERVER=(local)
For MySql - use the odbcconf command with a config file in this wa
"odbcconf /f myodbc.rsp
where the myodbc.rsp file contains the followin
INSTALLDRIVER "MySQL Driver|Driver=myodbc.dll|Setup=myodbc.dll||
CONFIGDRIVER "MySQL Driver" "APILevel=2
CONFIGDRIVER "MySQL Driver" "ConnectFunctions=YYN
CONFIGDRIVER "MySQL Driver" "DriverODBCVer=2.50.40
CONFIGDRIVER "MySQL Driver" "FileUsage=0
CONFIGDRIVER "MySQL Driver" "FileExtns=*.txt
CONFIGDRIVER "MySQL Driver" "SQLLevel=1
CONFIGDRIVER "MySQL Driver" "CPTimeout=60
CONFIGDSN "MySQL Driver" "DSN=sample-MySQL;Description=MySQL ODB
Driver;SERVER=database_server;User=odbc;DB=test;Port=3306||"