Search code examples
databasejdbcibm-midrange

AS400 Database access via jdbc


I am trying do a query on a table via jdbc in my java program.

I know there are three rows in that table.

I've got the resultset, and can read and process data of the first row. but when I try to move the resultset to next row, an exception is thorwn.

the exception pointed [SQL0181]

Solution

  • You can use the SQL Message Finder to look up message codes.

    The SQL0181 message text is:

    Value in date, time, or timestamp string not valid.

    This indicates you have a value in a row that can not be represented as an SQL Datetime value.

    It is not uncommon for legacy HLL programs to introduce these sorts of errors as they are capable of writing directly to the table row without the same validation enforced by the SQL interface.


    See also this previously asked SO question: Why am I getting a “[SQL0802] Data conversion of data mapping error” exception?