Anthony Kong
Anthony Kong

Reputation: 40624

Sybase 15.5 ODBC driver cannot retrieve the full content in a text column if the data in it exceeds 32768 characters (2^15)

I store XML content as a string in a text column, but after upgrading to Sybase driver 15.5, I cannot retrieve the full string. It is always truncated to 32768 characters.

I have tried the FOR XML AUTO, TYPE keywords as suggested here but it did not work for me.

The driver I'm using is:

Adaptive Server Enterprise 15.05.00.1

The server version is:

Adaptive Server Enterprise/15.0.3/EBF 17163 ESD#3/P/Linux Intel/Linux 2.6.9-42.ELsmp i686/ase1503/2726/32-bit/FBO/Fri Feb 5 04:45:36 2010'

Does anyone know if it is a driver bug? Is there any workaround?

Upvotes: 0

Views: 1000

Answers (1)

Anthony Kong
Anthony Kong

Reputation: 40624

The solution is about setting the textsize before running the query

set TEXTSIZE  2147483647

2147483647 is 2^ 31 - 1

Upvotes: 1

Related Questions