IBM Support

JR28437: MULTIBYTE CHARACTER IN LITERAL STRING MAY CAUSE SQL0104N

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • DB2 applications that use the legacy JDBC driver or CLI API may
    experience error SQL0104N in rare situations when preparing an
    SQL statement containing a double-byte character (e.g. 0x819B
    in ja_JP.SJIS) and the application makes repeated, successive
    calls to the Java method setMaxRows() or the CLI function
    SQLSetStmtAttr( ... SQL_ATTR_MAX_ROWS ... ).
    Example:
           :
        String sql = "SELECT '?' FROM SYSIBM.SYSDUMMY1";
        PreparedStatement pstmt = conn.prepareStatement( sql );
        pstmt.setMaxRows ( 500 );
        pstmt.setMaxRows ( 500 );
        ResultSet rs5 = pstmt.executeQuery();
           :
    The SQL statement is incorrectly translated to contain double
    FETCH FIRST <n> ROWS ONLY clauses as in:
    SELECT * FROM SYSDUMMY1 FETCH FIRST 500 ROWS ONLY FETCH FIRST
    500 ROWS ONLY
    

Local fix

  • Remove the duplicate call from the application that sets the
    maximum rows.
    

Problem summary

  • Users Affected:  CLI applications
    Problem Description:  An application may receive an SQL0104
    error if there are multi-byte characters in a literal.
    

Problem conclusion

  • First fixed in DB2 UDB Version 9.5, FixPak 2
    

Temporary fix

Comments

APAR Information

  • APAR number

    JR28437

  • Reported component name

    DB2 UDB EXE WIN

  • Reported component ID

    5724E4901

  • Reported release

    950

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2008-02-05

  • Closed date

    2008-08-29

  • Last modified date

    2008-08-29

  • APAR is sysrouted FROM one or more of the following:

    JR27157

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    DB2 UDB EXE WIN

  • Fixed component ID

    5724E4901

Applicable component levels

  • R950 PSN

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSEPGG","label":"DB2 for Linux, UNIX and Windows"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"950","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
29 August 2008