ODBC drivers >

JDBC drivers >

Bridges, gateways >

Other >

All products

Connect JDBC to any ODBC driver

Connect JDBC to Microsoft Access

Cross-platform or cross-architecture access to any ODBC driver

ODBC access to any JDBC driver

Connect dbExpress applications to any ODBC driver

Connect XML applications to any ODBC driver

Access mutiple ODBC data sources from one SQL statement

Create custom ODBC drivers

Bespoke data access requirements

In the pipeline

Support

Resources

Quick start

Licensing

Knowledge Base

User Guides

Company

About Us

Careers & Partners

Changing how isql executes SQL

isql is typically used as a troubleshooting tool. For example, if you are having an issue with your ODBC back end, isql will help you identify whether the problem lies with your application (do you still get the same problem in isql as you get in your application?) or elsewhere.

isql's -e flag enables you to change how isql executes SQL. Doing this enables you to simulate how your application behaves in this regard.

To find out which method your application uses to execute SQL:

  1. Add these lines to /etc/odbcinst.ini:
    [ODBC]
    Trace=Yes
    TraceFile=/tmp/sql.log
  2. Run a query in your application.
  3. Open /tmp/sql.log in a text editor. If the log file contains SQLPrepare your application uses this ODBC API. Otherwise, it uses SQLExecDirect.
  4. In /etc/odbcinst.ini, turn off ODBC tracing:
    [ODBC]
    Trace=No
    TraceFile=/tmp/sql.log

By default, isql uses SQLPrepare and SQLExecute to execute SQL statements.

To use SQLExecDirect instead, include the -e flag on the command line:

 /usr/local/easysoft/unixODBC/bin/isql.sh -e -v SQLSERVER_SAMPLE
SQL> SELECT mycol FROM mytable
Share:

AltStyle によって変換されたページ (->オリジナル) /