I am using the Transaction in sql to force all the query results in success.But It is not working. What to do to set it so that all queries run successfully and if error occur in any query then all queries should not be executed. this is how I am using the transactions in sql server....
BEGIN TRANSACTION
GO
INSERT [form].[control](Id,Name,Title,ElementType,IsRequired,Length,MinValue,MaxValue,Mask,DefaultValue,OptionType,DbType,AddOn,AddOnBefore,ShowHide,ShowHideCtrlType,DisabledCtrl,DisabledCtrlType,IsActive,IsHidden,ParentId,CreatedBy,CreatedOn,UpdatedBy,Updatedon,Class,Multiple)
VALUES('43',null,'Current Medical & Mental Health Diagnoses','2',null,null,null,null,null,null,null,'1',null,null,null,null,null,null,'1',null,null,'1',convert(datetime,'Jan 1 2016 12:00AM'),null,null,'15','0')
update form.Control
set class= NULL
where id = 43
COMMIT TRANSACTION ;