Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,369

    Unanswered: sql error from JDBC driver?

    Application X is using JDBC type-4 driver to access DB2 zOS and is getting some sql error message (don't know what the application is doing and what error it's getting). Can the JDBC driver return sql... error message or the error must be coming from DB2 zOS server? I've seen JDBC exceptions with sql code/state in the past and always thought that it's coming from the DB2 server. Mainframe DBA tells me that the error is coming from the driver???

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    I am not sure if I will call them SQLCODEs, but have seen errors thrown by JDBC drivers with what looks like sqlcode.

    ---
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    A quick search in the info center shows error messages generated by JDBC driver ..

    Error codes issued by the IBM Data Server Driver for JDBC and SQLJ - IBM DB2 9.7 for Linux, UNIX, and Windows

    SQLSTATEs issued by the IBM Data Server Driver for JDBC and SQLJ - IBM DB2 9.7 for Linux, UNIX, and Windows

    From the first link ..
    Error codes in the ranges +4200 to +4299, +4450 to +4499, -4200 to -4299, and -4450 to -4499 are reserved for the IBM® Data Server Driver for JDBC and SQLJ.

    When you call the SQLException.getMessage method after a IBM Data Server Driver for JDBC and SQLJ error occurs, a string is returned that includes:
    Whether the connection is a type 2 or type 4 connection
    Diagnostic information for IBM Software Support
    The level of the driver
    An explanatory message
    The error code
    The SQLSTATE
    For example:
    [jcc][t4][20128][12071][3.50.54] Invalid queryBlockSize specified: 1,048,576,012.
    Using default query block size of 32,767. ERRORCODE=0, SQLSTATE=
    Visit the new-look IDUG Website , register to gain access to the excellent content.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •