desikankannan
Posting Yak Master
152 Posts |
Posted - 2010-11-11 : 00:22:29
|
hi,below the stored procedure, iam sending, its not firing.pls guide me how to write error handling. USE [smartsystem]GO/****** Object: StoredProcedure [dbo].[procstdguagemaster] Script Date: 11/11/2010 10:46:47 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOALTER procedure [dbo].[procstdguagemaster](-- insert record for guagemaster createion date @fldguagekey bigint,@fldguagecode bigint,@fldguagename varchar(200),@fldguageidnum varchar(30),@fldguagewrlimit numeric(18,4),@fldimsizego numeric(18,4),@fldimsizenogo numeric(18,4),@fldscrapflag varchar(1),@companyid varchar(50),@userid varchar(100),@creationdate datetime,@modifiedby varchar(100),@modifydate datetime,@status varchar(50),@cancel varchar(50),@reasonforcancel varchar(50),@scrapflag char(1) )as set nocount onbegin transactioninsert into mst_stdgaugemaster(fldguagekey,fldguagecode,fldguagename,fldguageidnum,fldguagewrlimit,fldimsizego,fldimsizenogo,fldscrapflag,companyid,userid,creationdate,modifiedby,modifydate,status,cancel,resonforcancel,scrapflag) values(@fldguagekey,@fldguagecode,@fldguagename,@fldguageidnum,@fldguagewrlimit,@fldimsizego,@fldimsizenogo,@fldscrapflag,@companyid,@userid,@creationdate,@modifiedby,@modifydate,@status,@cancel,@reasonforcancel,@scrapflag)if @@error <> 0 goto ERR_HANDLERcommit transactionreturn 0--Exception HandingERR_HANDLER:print 'unexpected error occurred!'Rollback transactionreturn 1Desikankannan |
|