JezK
Edit File: odbcombo.html
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>ODBC-combined configuration</title><link rel="stylesheet" type="text/css" href="userguide.css" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="home" href="index.html" title="FreeTDS User Guide" /><link rel="up" href="prepodbc.html" title="Chapter 4. Preparing ODBC" /><link rel="prev" href="odbcinionly.html" title="ODBC-only configuration" /><link rel="next" href="odbcdiagnose.html" title="Troubleshooting ODBC connections" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">ODBC-combined configuration</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="odbcinionly.html">Prev</a> </td><th width="60%" align="center">Chapter 4. Preparing ODBC</th><td width="20%" align="right"> <a accesskey="n" href="odbcdiagnose.html">Next</a></td></tr></table><hr /></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="odbcombo"></a>ODBC-combined configuration</h2></div></div></div><p>Like the DSN-less configuration, ODBC-combined keeps server properties in <code class="filename">freetds.conf</code>. The difference is that your applications can refer to the server by its DSN. To make that possible, the DSN entry in <code class="filename">odbc.ini</code> refers to the servername entry in <code class="filename">freetds.conf</code>. </p><div class="example"><a id="e.g.SampleODBCcombo"></a><p class="title"><strong>Example 4.5. Sample ODBC-combined <code class="filename">odbc.ini</code> file</strong></p><div class="example-contents"><pre class="programlisting"> [ODBC Data Sources]<a href="#ftn.idm2269" class="footnote" id="idm2269"><sup class="footnote">[13]</sup></a> JDBCdsn = Sybase JDBC Server [JDBCdsn] Driver = /usr/local/freetds/lib/libtdsodbc.so Description = Sybase JDBC Server Trace = No Servername = JDBC<a href="#ftn.idm2273" class="footnote" id="idm2273"><sup class="footnote">[14]</sup></a> Database = pubs2 [Default] Driver = /usr/local/freetds/lib/libtdsodbc.so </pre></div></div><p><br class="example-break" /> </p><div class="example"><a id="e.g.samplecombofile"></a><p class="title"><strong>Example 4.6. Sample ODBC-combined <code class="filename">freetds.conf</code> file</strong></p><div class="example-contents"><pre class="programlisting"> ; ; freetds.conf ; [JDBC] host = jdbc.sybase.com port = 4444 tds version = 5.0 </pre></div></div><p><br class="example-break" /></p><p>With this arrangement, an application can connect to the server in two ways, via its DSN (<code class="literal">JDBCdsn</code>), or its servername (<code class="literal">JDBC</code>).</p><div class="footnotes"><br /><hr style="width:100; text-align:left;margin-left: 0" /><div id="ftn.idm2269" class="footnote"><p><a href="#idm2269" class="para"><sup class="para">[13] </sup></a>Several DSNs might be listed here. In this example, we have only one, <span class="quote">“<span class="quote">JDBCdsn</span>”</span>. It matches the <code class="literal">[JDBCdsn]</code> entry later in the file.</p></div><div id="ftn.idm2273" class="footnote"><p><a href="#idm2273" class="para"><sup class="para">[14] </sup></a>Refers to the <code class="literal">[JDBC]</code> entry in <code class="filename">freetds.conf</code>.</p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="odbcinionly.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="prepodbc.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="odbcdiagnose.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">ODBC-only configuration </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Troubleshooting ODBC connections</td></tr></table></div></body></html>