Installation guide

mxODBC - Python ODBC Database Interface
File Data Sources (File-DSN)
File data sources are special in the sense that they store the data source
connection information and options in a dedicated file rather than in the registry.
This can be useful if you want to manage data sources across many servers and
keep the data source files on a central file server.
You create such DSN files using the ODBC manager (if supported) or by using a
text editor.
A DSN file uses the same syntax as the ODBC connection strings, with the
difference that the file must start with the line
[ODBC] and each keyword-value
pair must be on a separate line, e.g. postgresql.dns:
[ODBC]
Driver = /usr/local/postgresql/lib/psqlodbcw.so
Database = mydb
ServerName = postgresql.example.net
Port = 5432
#Debug = 0
#Optimizer = 0
#CommLog = 0
#ReadOnly = 0
#SSLmode = require
ByteaAsLongVarBinary = 1
TextAsLongVarchar = 1
Please see the FILEDSN MS Knowledge-Base article 165866 for details regarding
the file format.
In order to connect to such a data source, you have to use the
mx.ODBC.Manager.DriverConnect() API and provide a
"FILEDSN=/etc/postgresql.dns" entry instead of the usual "DSN=mydsn" as
part for the connection string.
See the ODBC File Data Source documentation
for more details.
3.3.7 DSN-less Connections
If you don't want to bother setting up a data source in the ODBC manager, you
can also use a DSN-less connection setup.
Pros and Cons of using DSN-less Connections
These setups include all required driver and connection information in the
connection string itself. All connection information is thus under the control of the
application, without any system ODBC manager being aware of the connection
setup.
This has both up- and downsides. The most important downside is that changes
to the server system can no longer be administered through the ODBC manager,
but instead have to be repeated in each application using a DSN-less setup. Even
30