iusql is the same tool with built-in Unicode support. Some datasources only work with iusql.
A bare name is looked up in the above files. If the DSN name begins with a semicolon then it's treated as a connection string instead. The connection string may contain a DSN name and/or other semicolon-separated parameters.
Overrides any UID specified in the DSN.
Overrides any Password specified in the DSN.
help
help table
help help
$ iusql WebDB MyID MyPWD -w -b < My.sql
Connects to the WebDB as user MyID with password MyPWD, then execute the commands in the My.sql file and returns the results wrapped in HTML table. Each line in My.sql must contain exactly 1 SQL command, except for the last line, which must be blank (unless the -n option is specified).
Note the leading semicolon on the connection string:
$ iusql ";DSN=WebDB" MyID MyPWD -w -b < My.sql
Options in the DSN may be overridden in the connection string:
$ iusql ";DSN=WebDB;Driver=PostgreSQL ODBC;UID=MyID;PASSWORD=secret;Debug=1;CommLog=1" -v
A string DSN may be provided in its entirety, with no file DSN reference at all:
$ iusql ";Driver=PostgreSQL Unicode;UID=MyID;PASSWORD=secret" -v
Re-run iusql or isql with the -v flag to get more detail from errors, and/or enable Trace mode in odbcinst.ini.
Check that the driver name specified by the Driver entry in the odbc.ini data-source definition is present in odbcinst.ini and exactly matches the odbcinst [section name].
If the driver is properly specified for the datasource it's possible that the driver may not be loadable. Check for mixups between Unicode and ANSI drivers. Verify the driver paths in the odbcinst.ini section name.
Some datasources are Unicode-only and only work with iusql. If isql reports
[IM002][unixODBC][Driver Manager]Data source name not found and no default driver specified [ISQL]ERROR: Could not SQLConnectbut the datasource is listed by
odbcinst -q -dand the driver it uses is listed by
odbcinst -q -dthen try iusql.
/etc/odbc.ini
$HOME/.odbc.ini
The authors of unixODBC are Peter Harvey <pharvey@codebydesign.com> and Nick Gorham <nick@lurcher.org>. For the full list of contributors see the AUTHORS file.
unixODBC is licensed under the GNU Lesser General Public License. For details about the license, see the COPYING file.