Skip to Content.
Sympa Menu

freetds - Re: [freetds] problems storing more than 8000 bytes of data in a varchar(max) column

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Bob Hetzel <beh AT case.edu>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] problems storing more than 8000 bytes of data in a varchar(max) column
  • Date: Fri, 17 Aug 2007 13:46:18 -0400

There's actually a big plus side to the varchar(max) field type however. It also gets around a limitation in record size. Previously, changing to text fields was required so your record wouldn't go past a page limit, not as well as to allow 1 big field in a record. However, that had limitations on how you could search. The varchar(max) field type removes those limitations. Too bad they didn't just figure out a way to extend the varchar datatype seamlessly, but I guess db engine designers like to help keep dba's employed. :)

Bob

James K. Lowden wrote:
Moritz Bunkus wrote:
But the MS
SQL Server 2005 documentation states in various places that "text" type
columns are deprecated and will be removed in future versions. It
suggests using the column type "varchar(max)"

Ah, I see. I hadn't come across that yet, thanks.
FWIW, I wouldn't worry too much about deprecation announcements. There
are a lot of databases and software out there that use TEXT. It will take
years to do away with it.
I guess it was 10 years ago Microsoft deprecated db-lib. First they
warned us about it, then they stopped updating it, then they stopped
including it, then they dropped the documentation. But it still works. We've also been told for years not to use the system tables, to rely
instead on the information schema views. Except the only place some
things can be found is in the system tables and -- wouldn't you know it?
-- that's what Microsoft's own procedures use.
Also, sometimes the advice about the future changes before the future
arrives. There've been some dead ends. Don't get me started about
SQL-DMO. And then there are the unwarned-about changes, like substituting
'sys' for 'dbo' and changing the optimizer in ways that made some
pre-existing queries run slow. However hard you work to prevent problems
with future releases, there will always be some.
My policy is to use what I know and take advantage of new features when
they're helpful. If and when the day comes that Microsoft says not "in
future versions" but "in the next version", you'll know it's time to the
big search-and-replace.
BTW, if you do use DBD::Sybase, be advised placeholders don't work. They
can't, because of the way they're defined in ct-lib.
Regards,

--jkl
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds




Archive powered by MHonArc 2.6.24.

Top of Page