Hi
I'm executing a query on DB2 on as/400 and the result only has 1 row. This only happens on some tables. But if I execute the same query using AnySQL Maestro, the result set is correct. I'm using ODBC and Client Access to connect to AS/400.
Query to DB2 on AS/400 only returns 1 row
Hello,
Try to set the value of the FetchRows property to 1 and execute your query once more. If this time the query returns the correct number of lines, the problem is connected with your ODBC driver, that “expands” dataset incorrectly. In this case you need to contact its developers.
If the query returns only one line after setting this option to 1, contact us once more.
Try to set the value of the FetchRows property to 1 and execute your query once more. If this time the query returns the correct number of lines, the problem is connected with your ODBC driver, that “expands” dataset incorrectly. In this case you need to contact its developers.
If the query returns only one line after setting this option to 1, contact us once more.
Hello,
Each ODBC driver should support row-wise binding according to http://msdn.microsoft.com/en-us/library/ms403318.aspx
The first problem of your ODBC driver is that this driver doesn't support row-wise binding. UniDAC can use ODBC drivers that don't support row-wise binding. But in this case if ODBC driver doesn't support row-wise binding, it should return error code on trying to set the SQL_ATTR_ROW_BIND_TYPE parameter to a value different from SQL_BIND_BY_COLUMN. But your ODBC driver returns SQL_SUCCESS.
You should ask developers of your ODBC driver to support row-wise binding or return any error code different from SQL_SUCCESS on trying to set the SQL_ATTR_ROW_BIND_TYPE parameter to a value different from SQL_BIND_BY_COLUMN.
P.S. AnySQL Maestro may be using the second way of receiving data (by columns) by default, and that's why it may be working correctly with your ODBC driver.
Each ODBC driver should support row-wise binding according to http://msdn.microsoft.com/en-us/library/ms403318.aspx
The first problem of your ODBC driver is that this driver doesn't support row-wise binding. UniDAC can use ODBC drivers that don't support row-wise binding. But in this case if ODBC driver doesn't support row-wise binding, it should return error code on trying to set the SQL_ATTR_ROW_BIND_TYPE parameter to a value different from SQL_BIND_BY_COLUMN. But your ODBC driver returns SQL_SUCCESS.
You should ask developers of your ODBC driver to support row-wise binding or return any error code different from SQL_SUCCESS on trying to set the SQL_ATTR_ROW_BIND_TYPE parameter to a value different from SQL_BIND_BY_COLUMN.
P.S. AnySQL Maestro may be using the second way of receiving data (by columns) by default, and that's why it may be working correctly with your ODBC driver.