Home > Archive > SQL Anywhere database > July 2005 > Field length restrictions on Sybase ASA ODBC drivers?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Field length restrictions on Sybase ASA ODBC drivers?
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

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com