You are here: Re: Sql Server incorrectly functioning « MsSQL Server « IT news, forums, messages
Re: Sql Server incorrectly functioning

Posted by Erland Sommarskog on 05/26/05 10:00

Steve (fizzy1236@yahoo.com) writes:
> Thanks, I will give a good read through and rework this. Not too happy
> with Microsoft's documentation, as they state I should be able to do
> this. From Sql Server Books Online...
>
> -- Save any non-zero @@ERROR value.
> IF (@@ERROR <> 0)
> SET @ErrorSave = @@ERROR
>
> Found in the using @@ERROR section.

See below for a link to an updated version of Books Online. It is indeed
an embarrssing error. But the same section also says:

Because @@ERROR is cleared and reset on each statement executed, check
it immediately following the statement validated, or save it to a local
variable that can be checked later.


--
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

 

Navigation:

[Reply to this 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

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