tag:blogger.com,1999:blog-495177919198719500.post8615623696419330723..comments2023-12-27T20:52:29.483-08:00Comments on Microsoft Sql Server Tutorials: Throw Statement in SQL Server 2012Suprotim Agarwalhttp://www.blogger.com/profile/08349831623922214390noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-495177919198719500.post-36832213161736835852015-11-25T19:51:03.150-08:002015-11-25T19:51:03.150-08:00Good example Shakti!Good example Shakti!Suprotim Agarwalhttps://www.blogger.com/profile/08349831623922214390noreply@blogger.comtag:blogger.com,1999:blog-495177919198719500.post-68455700257624325662015-08-27T03:13:38.172-07:002015-08-27T03:13:38.172-07:00IF exists(select zServiceTypeLookupId from [dbo].z...IF exists(select zServiceTypeLookupId from [dbo].zServiceTypeLookup where ParentServiceId=@masterDataId) <br /> BEGIN TRY<br /> THROW 54600,'You can not DeActivate the record Which has Corresponding Child record(s).',12 <br /> END TRY<br /> BEGIN CATCH<br /> THROW --at the front-end side "ex.InnerException.Message" will give you the above error message<br /> END CATCH <br /><br />--simply i modified and usedAnonymoushttps://www.blogger.com/profile/07038463562187241959noreply@blogger.com