Reply to Re: row length exceeds 8060 bytes

Your name:

Reply:


Posted by Erland Sommarskog on 06/08/05 01:07

Boris (supermanreloaded@gmail.com) writes:
> I have created a table in sql server 2000 where at the time of creating
> it, the row size excced 8K. I understand why I get the warning below:
>
> The table 'tbl_detail' has been created but its maximum row size
> (12367) exceeds the maximum number of bytes per row (8060). INSERT or
> UPDATE of a row in this table will fail if the resulting row length
> exceeds 8060 bytes.
>
> However, when I call a stored procedure from my ASP Code, which returns
> me this warning, my ASP page displays the warning and does not move to
> the next line.
>
> What can I do not to get this warning? How do I turn off warning
> messages? I tried to wrap my stored procedure call code within SET
> NOCOUNT ON and SET NOCOUNT OFF but that didn't help.

You cannot turn off the warning on the SQL Server side.

I am a little surprised that ASP stops on the warning. Usually ADO
swallows informational messages completely. You could customize the
error handler in the ASP code, to check on the error number, and
ignore this message.

However, there is something fishy here. If the table already exists,
running the stored procedure should not give you the warning. So I
suspect one three things:

1) You are creating a temp table in the SP which also possibly could
exceed 8K. In this case, you could as a last resort split up the
temp table into two.
2) You insert data that exceeds 8K, so you actually get an error, not
a warning.
3) You are dropping and recreating tbl_detail. Dynamically changing the
schema is usuaally poor design.



--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация