Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 2005 handling of varchar limit

Author  Topic 

influent
Constraint Violating Yak Guru

367 Posts

Posted - 2006-12-20 : 14:40:21
My coworkers created a table in SQL Server 2000 with over 100 varchar(8000) columns, not realizing that it wouldn't take much to exceed the 8060 limit. So we moved the database to SQL Server 2005, and now everything works great. What I don't understand is why everything works when we didn't change the column types from varchar(8000) to varchar(MAX). We didn't change the compatibility level to 90 either, it's still at 80. Any ideas?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-12-20 : 14:44:33
When you say it works in 2005 with 80 compatibility level, what do you mean? An insert of more than 8060 bytes works?

Tara Kizer
Go to Top of Page

influent
Constraint Violating Yak Guru

367 Posts

Posted - 2006-12-20 : 16:14:57
Sorry, yes, there are no errors when I insert more than 8060. I can run the exact same INSERT statements on SQL 2000 and get errors.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-12-20 : 16:18:07
See the Page Size section in this MS blog:
http://blogs.msdn.com/mssqlisv/archive/2006/07/07/659374.aspx

Tara Kizer
Go to Top of Page
   

- Advertisement -