Problem : More fun with Client Access ODBC

Problem : More fun with Client Access ODBC

I have a table that causes the following error when I select more than 5187 records.

Connectivity error: [IBM][Client Access Express ODBC Driver (32-bit)]Communication link failure. comm rc=8405 – CWBCO1047 – The AS/400 server application  disconnected the connection

After the error I need to discconect and reconnect to continue.

I attempted to do a Select * from Table and it failed at 5187 records returned

I then tried:

SELECT * FROM TABLE FETCH FIRST 5187 rows only – OK
SELECT * FROM TABLE FETCH FIRST 1 ROWS ONLY – FAILED

Then

SELECT * FROM TABLE FETCH FIRST 5186 rows only – OK
SELECT * FROM TABLE FETCH FIRST 1 rows only – OK
SELECT * FROM TABLE FETCH FIRST 1 ROWS ONLY – FAILED

Then

SELECT * FROM TABLE FETCH FIRST 5185 rows only – OK
SELECT * FROM TABLE FETCH FIRST 1 rows only – OK
SELECT * FROM TABLE FETCH FIRST 1 rows only – OK
SELECT * FROM TABLE FETCH FIRST 1 ROWS ONLY – FAILED

When I try from SQL Scripts in Ops Nav it appears to be running but does not return any results

When I look at it in the green screen with STRSQL or RUNQRY the data is readable and nothing is odd about row 5188 or beyond?

Any ideas?


Solution : More fun with Client Access ODBC

It _looks_ as if some non-numeric data is in a column (field) defined as being numeric. The RUNQRY command can give an indication whether that’s true or not and help highlight the column in error.

The DSPPFM command can also be used in order to view unformatted images of the data space. DSPPFM will display a physical file member without regard to field data types. It can optionally display record images in hex.

Non-numeric data can end up in numeric fields in a few ways. For example, a CPYF command can be run with the *NOCHK option. (Any file operation that deliberately disables  verification opens the chance of data corruption.)