Skip to Content.
Sympa Menu

freetds - Re: LONGVARCHAR in freetds JDBC max size is 4096?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: "'TDS Development Group'" <freetds AT franklin.oit.unc.edu>
  • Subject: Re: LONGVARCHAR in freetds JDBC max size is 4096?
  • Date: Mon, 7 May 2001 14:10:30 -0400


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.
Every time.

Brian's memory serves well, as well:

<snip>
@@TEXTSIZE (T-SQL)
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
statement returns.

Syntax
@@TEXTSIZE

Return Types
integer

Remarks
The default size is 4096 bytes (4 KB).
...
</snip>

(We'll just overlook how big a kilobyte is...)

--jkl


-----Original Message-----
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.




Archive powered by MHonArc 2.6.24.

Top of Page