| Dan Konigsbach 2005-07-13, 1:23 pm |
| Do the Sybase ASA ODBC drivers have any field length restrictions that
are more stringent than the actual database? A developer is getting a
hard-to-explain "Data truncated" error, and the evidence seems to point
to the Sybase ODBC driver.
The database column is declared long varchar, and in the row in
question it has a string value of length 1,086,511 bytes. We can
successfully read it via ISQL.
Using "Adaptive Server Anywhere 8.0" ODBC driver (I can check the
version if that is significaint), the developer testing this extreme
case cannot read that row via ODBC using an MFC Windows application.
The recordset open is successful. The MFC ODBC class (actually,
RFX_Text, which is explicitly told to allocate a buffer this long) is
allocating and binding a buffer of 2,097,152 bytes - we have confirmed
this by stepping through the debugger.
However the ODBC call SQLFetch is returning Data Truncated (SQLSTATE
01004). We know that the row is okay in the database, and it appears
that a large-enough buffer is being bound. Is there some other
limitation or configuration that is neeeded?
Thanks,
Dan Konigsbach
|