bill lam
2010-10-01 14:28:27 UTC
Using the latest v.2 odbcfb driver against the same fb 2.5 server, I found
the octet buffer length as reported by SqlDescribeCol for SQL_INTEGER is incorrect for the
linux 64-bit odbcfb. It should be 4 (window version is correct) but it
reported 8. When retrieving data using column binding, it actual fill 8 bytes
or each SQL_INTEGER, with garbage in the upper 4 bytes.
I also found the it failed to update correctly using sqlbindparameter for
SQL_INTEGER, it did report any error but all field following the integer
field were in fact not updated. It might related to this bug.
No problem for the other 3 combinations: W64 W32 L32.
window 64-bit driver
+-----------+---------+-----------------+-----------+-------------+
|COLUMN_NAME|DATA_TYPE|TYPE_NAME |COLUMN_SIZE|BUFFER_LENGTH|
+-----------+---------+-----------------+-----------+-------------+
|CODEN |4 |INTEGER |10 |4 |
+-----------+---------+-----------------+-----------+-------------+
|DESCR1 |_9 |VARCHAR |10 |30 |
+-----------+---------+-----------------+-----------+-------------+
|DESCR2 |_9 |VARCHAR |10 |30 |
+-----------+---------+-----------------+-----------+-------------+
|TYPEN |4 |INTEGER |10 |4 |
+-----------+---------+-----------------+-----------+-------------+
|MAXN |4 |INTEGER |10 |4 |
+-----------+---------+-----------------+-----------+-------------+
|MEMO1 |_4 |BLOB SUB_TYPE BLR|2147483647 |2147483647 |
+-----------+---------+-----------------+-----------+-------------+
linux 64-bit driver
+-----------+---------+-----------------+-----------+-------------+
|COLUMN_NAME|DATA_TYPE|TYPE_NAME |COLUMN_SIZE|BUFFER_LENGTH|
+-----------+---------+-----------------+-----------+-------------+
|CODEN |4 |INTEGER |10 |8 |
+-----------+---------+-----------------+-----------+-------------+
|DESCR1 |_9 |VARCHAR |10 |30 |
+-----------+---------+-----------------+-----------+-------------+
|DESCR2 |_9 |VARCHAR |10 |30 |
+-----------+---------+-----------------+-----------+-------------+
|TYPEN |4 |INTEGER |10 |8 |
+-----------+---------+-----------------+-----------+-------------+
|MAXN |4 |INTEGER |10 |8 |
+-----------+---------+-----------------+-----------+-------------+
|MEMO1 |_4 |BLOB SUB_TYPE BLR|2147483647 |2147483647 |
+-----------+---------+-----------------+-----------+-------------+
the octet buffer length as reported by SqlDescribeCol for SQL_INTEGER is incorrect for the
linux 64-bit odbcfb. It should be 4 (window version is correct) but it
reported 8. When retrieving data using column binding, it actual fill 8 bytes
or each SQL_INTEGER, with garbage in the upper 4 bytes.
I also found the it failed to update correctly using sqlbindparameter for
SQL_INTEGER, it did report any error but all field following the integer
field were in fact not updated. It might related to this bug.
No problem for the other 3 combinations: W64 W32 L32.
window 64-bit driver
+-----------+---------+-----------------+-----------+-------------+
|COLUMN_NAME|DATA_TYPE|TYPE_NAME |COLUMN_SIZE|BUFFER_LENGTH|
+-----------+---------+-----------------+-----------+-------------+
|CODEN |4 |INTEGER |10 |4 |
+-----------+---------+-----------------+-----------+-------------+
|DESCR1 |_9 |VARCHAR |10 |30 |
+-----------+---------+-----------------+-----------+-------------+
|DESCR2 |_9 |VARCHAR |10 |30 |
+-----------+---------+-----------------+-----------+-------------+
|TYPEN |4 |INTEGER |10 |4 |
+-----------+---------+-----------------+-----------+-------------+
|MAXN |4 |INTEGER |10 |4 |
+-----------+---------+-----------------+-----------+-------------+
|MEMO1 |_4 |BLOB SUB_TYPE BLR|2147483647 |2147483647 |
+-----------+---------+-----------------+-----------+-------------+
linux 64-bit driver
+-----------+---------+-----------------+-----------+-------------+
|COLUMN_NAME|DATA_TYPE|TYPE_NAME |COLUMN_SIZE|BUFFER_LENGTH|
+-----------+---------+-----------------+-----------+-------------+
|CODEN |4 |INTEGER |10 |8 |
+-----------+---------+-----------------+-----------+-------------+
|DESCR1 |_9 |VARCHAR |10 |30 |
+-----------+---------+-----------------+-----------+-------------+
|DESCR2 |_9 |VARCHAR |10 |30 |
+-----------+---------+-----------------+-----------+-------------+
|TYPEN |4 |INTEGER |10 |8 |
+-----------+---------+-----------------+-----------+-------------+
|MAXN |4 |INTEGER |10 |8 |
+-----------+---------+-----------------+-----------+-------------+
|MEMO1 |_4 |BLOB SUB_TYPE BLR|2147483647 |2147483647 |
+-----------+---------+-----------------+-----------+-------------+
--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3