ODBC-combined configuration

Like the DSN-less configuration, ODBC-combined keeps server properties in freetds.conf. The difference is that your applications can refer to the server by its DSN. To make that possible, the DSN entry in odbc.ini refers to the servername entry in freetds.conf.

Example 4-5. Sample ODBC-combined odbc.ini file

	[ODBC Data Sources][1]
	JDBCdsn = Sybase JDBC Server
	Driver          = /usr/local/freetds/lib/libtdsodbc.so
	Description     = Sybase JDBC Server
	Trace           = No
	Servername      = JDBC[2]
	Database        = pubs2
	Driver          = /usr/local/freetds/lib/libtdsodbc.so

Example 4-6. Sample ODBC-combined freetds.conf file

	; freetds.conf
	host = jdbc.sybase.com
	port = 4444
	tds version = 5.0

With this arrangement, an application can connect to the server in two ways, via its DSN (JDBCdsn), or its servername (JDBC).



Several DSNs might be listed here. In this example, we have only one, "JDBCdsn". It matches the [JDBCdsn] entry later in the file.


Refers to the [JDBC] entry in freetds.conf.