LONGVARCHAR in freetds JDBC max size is 4096?
Lowden, James K
LowdenJK at bernstein.com
Mon May 7 14:10:30 EDT 2001
Right. Any driver can set whatever defaults it pleases by issuing commands
to the server when it initializes the connection. Nulls, for instance, can
be handled the "ansi" way or the "old" way. What the server does by default
is a database-level setting, but Microsoft's ODBC driver sets the null
handling (IIRC) to "ansi".
One could argue that it would be better to be faithful to the database's
settings (by default) or equally that it is better for the driver to present
a consistent behavior across connections to the programmer. This for sure:
when the programmer first bumps into new default settings, it's a surprise.
Brian's memory serves well, as well:
Returns the current value of the TEXTSIZE option of the SET statement, which
specifies the maximum length, in bytes, of text or image data that a SELECT
The default size is 4096 bytes (4 KB).
(We'll just overlook how big a kilobyte is...)
From: Spectron Caribe, Inc. [mailto:spectron at caribe.net]
Sent: May 7, 2001 10:24 AM
> From: "Brian Bruns" <camber at ais.org>
> > If I remember correctly SQL Server sets the default text size to
> > 4096...
Well, It must be the driver. I downloaded a trial driver from
http://www.inetsoftware.de (I tested Sprinta) and it works. The datalength
of the LONGVARCHAR column is 4486 and it is able to read it completely. It
is not truncated to 4096.
More information about the FreeTDS