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: "Spectron Caribe, Inc." <spectron AT caribe.net>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: Re: LONGVARCHAR in freetds JDBC max size is 4096?
  • Date: Tue, 8 May 2001 10:39:02 -0400


----- Original Message -----
From: "Bob Kline" <bkline AT rksystems.com>
To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
Sent: Tuesday, May 08, 2001 8:11 AM
Subject: [freetds] Re: LONGVARCHAR in freetds JDBC max size is 4096?


> On Mon, 7 May 2001, Spectron Caribe, Inc. wrote:
>
> > I'm using all the defaults my connection url is:
> >
> > jdbc:freetds:sqlserver://SERVERNAME/DATABASENAME
>
> As pointed out by other messages in this thread, the problem you are
> experiencing is caused by a default setting in SQL Server. It would
> indeed be nice, as you suggest, to be able to write portable client code
> which ignores this problem. Solving the problem by having the driver
> unconditionally override the default buffer size may run the risk,
> however, of breaking some existing applications by exhausting system
> resources. It may be preferable to have a property set in the
> environment which will trigger the SET statement, allowing the code to
> be written portably with as little risk as possible for existing
> applications.
>

Well, I checked the source and I found this function in
Connection_base.java:

protected String sqlStatementToInitialize()
{
return serverType==Tds.SYBASE ? "set quoted_identifier on set textsize
50000" : "";
}

It seems to me that it is unconditionally overriding the default when it is
a connection to
a Sybase server. If there is a worry about system resources I think it
should be only set
as a parameter in the URL like:

jdbc:freetds:sqlserver://SERVERNAME/DATABASENAME?textsize=50000

I don't think things would be broken by adding the parameter to the
connection URL.
The driver would call the 'set textsize' ONLY IF the parameter exists. If it
doesn't it will be the same driver we have now. It seems simple enough.

Faw

PS: Why is this fixed only on a Sybase connection if MS SQL has the same
problem?





Archive powered by MHonArc 2.6.24.

Top of Page