You are here: Re: Calling a Proc From a Proc « MsSQL Server « IT news, forums, messages
Re: Calling a Proc From a Proc

Posted by Erland Sommarskog on 01/10/07 15:02

Trevor Bishop (trevorbishop@viper.com) writes:
> Sorry, my second proc does not receive values (input or output) from the
> first proc - it jut needs to fire after the first one completes. The
> second proc is just an update statement that pulls its select list from
> a couple views.
>
> Is there a reason with this structure that the 2nd proc would not fire?

I can only think of two reasons why the second procedure would not be
called:

1) There is a batch-aborting error.
2) The table you update has a trigger which rollbacks or commits the
transaction. If a trigger terminates with a different trancount than
it started with, the batch is aborted.

How have you certified that the second stored procedure is never invoked?
Did you use Profiler to see what was actually executed? Or do you just
"feel" that it was never called?

Which version of SQL Server are you using?


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

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

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

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