OpenESQL (Known Issues)

Linking

If you use CHARSET(EBCDIC) when compiling COBOL code that contains SQL host variables that are of the display numeric type defined as XXXXXX, you must link to the oesqlebc library to prevent link errors.

You can either set up the link from the IDE and recompile, or run the required commands from a command prompt after compiling.

From the IDE, before compiling or recompiling:

From a command prompt, after compiling:

  1. Start a Visual COBOL command prompt. If you need instructions, see To start a Visual COBOL command prompt.
  2. At the command prompt, switch to the directory that contains your COBOL code.
  3. Enter the following commands consecutively:
    set lib=installDir\lib;%lib%
    cbllink myapp.obj oesqlebc.lib
    Where installDir is the path to your Visual COBOL installation (by default, this is %ProgramFiles(x86)%\Micro Focus\Enterprise Developer, and myapp is the name of your COBOL object file.

MySQL

  • Supported for ODBC only.
  • OpenESQL does not support scrollable cursors.
  • OpenESQL uses the MySQL _rowid field to support the use of positioned updates and deletes in cursors. The _rowid field is available in MySQL only when a table is defined with a unique constraint or primary key on an integer column.
    Note: When a table is not defined with a unique constraint or primary key on an integer column, you must replace EXEC SQL UPDATE/DELETE WHERE CURRENT OF statements with corresponding searched EXEC SQL UPDATE/DELETE statements.
  • When a row in MySQL is updated but the row contents do not change, MySQL might return an affected row count of 0 (zero) instead of 1 as is generally returned by other DBMSs. To work around this, consider modifying the MySQL ODBC driver Configuration Options as follows:
    1. Invoke the MySQL/Connector/ODBC Data Source Configuration.
    2. Click Cursors/Results.
    3. Check Return matched rows instead of affected rows
  • The following restrictions apply when using MySQL 5.7 with the ODBC 5.3 driver:
    • Unqualified SELECT * statements must not have any other items in the projection list
    • ODBC escape sequences are not recognized
    • MySQL does not permit deferred constraint checking for an SQL statement, or for SQL statements within a transaction boundary
    • SQL TYPE BLOB host variables are restricted to 3M bytes in length

ODBC

When using Oracle's ODBC driver, array fetches and some scrolling fetches might produce inconsistent behavior if you change the array size between fetches. To overcome this, build your application with SQL(NORESULTARRAY). When this is set, OpenESQL performs single row fetches under the covers, bypassing this limitation.