Use the iodbctest sample program to test your Data Source Names (DSNs).
The following example shows how this is done.
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=<nop>SQLServer Driver: 04.50.0801 OpenLink Generic ODBC Driver (oplodbc.so) SQL>select count(*) from timtest; count ----------- 100 result set 1 returned 1 rows.
Any of the DSN attributes in odbc.ini can be overridden in the command line connect string.
Connect strings take this form
DSN=dsn_name[;attr=value]*
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=' or `server='), and a means to identify a database instance on that server (`database=').
A driver may also have custom attributes, such as