<docbook><section><title>IODBCTestConnectionsUnix</title><bridgehead class="http://www.w3.org/1999/xhtml:h2">iODBC SDK Development</bridgehead>
<bridgehead class="http://www.w3.org/1999/xhtml:h3">iODBC SDK on Unix</bridgehead>
<bridgehead class="http://www.w3.org/1999/xhtml:h4">Making a Test Connection</bridgehead>
<para>Use the iodbctest sample program to test your Data Source Names (DSNs).
 The following example shows how this is done.</para><programlisting>zsh, purple  3:58PM bin/ % ls
iodbc-config*  iodbcadm-gtk*  iodbctest*
zsh, purple  3:58PM bin/ % echo $ODBCINI 
/home/tim/.odbc.ini
zsh, purple  3:58PM bin/ % ./iodbctest 
iODBC Demonstration program
This program shows an interactive SQL processor

Enter ODBC connect string (? shows list): 

Progress9.x(solaris)           | OpenLink Generic ODBC Driver  
Progress10.x(solaris)           | OpenLink Generic ODBC Driver    
SQLServer                      | OpenLink Generic ODBC Driver  

Enter ODBC connect string (? shows list): DSN=&lt;nop&gt;SQLServer
Driver: 04.50.0801 OpenLink Generic ODBC Driver (oplodbc.so)

SQL&gt;select count(*) from timtest;

count      
-----------
100        

 result set 1 returned 1 rows.
</programlisting><para> Any of the DSN attributes in odbc.ini can be overridden in the command line connect string.
 Connect strings take this form</para><programlisting>DSN=dsn_name[;attr=value]*
</programlisting><para> The attributes themselves depend on the database driver called by the DSN.
 Typically, attributes pass a database username and password, some form of server hostname (`host<computeroutput>=</computeroutput>&#39; or `server<computeroutput>=</computeroutput>&#39;), and a means to identify a database instance on that server (`database<computeroutput>=</computeroutput>&#39;).
 A driver may also have custom attributes, such as FetchBufferSize, Port, etc.
</para></section></docbook>