# If tag write error then rollback sql

**URL:** <https://forum.inductiveautomation.com/t/if-tag-write-error-then-rollback-sql/28459>\
**Category:** Ignition\
**Created:** [September 22, 2019, 9:32pm UTC](https://forum.inductiveautomation.com/t/if-tag-write-error-then-rollback-sql/28459 "2019-09-22T21:32:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![juang](https://avatars.discourse-cdn.com/v4/letter/j/9dc877/32.png) [@juang](https://forum.inductiveautomation.com/u/juang)\
**Post date:** [September 22, 2019, 9:32pm UTC](https://forum.inductiveautomation.com/t/if-tag-write-error-then-rollback-sql/28459/1 "2019-09-22T21:32:32Z")

</div>

Hello,

I currently run a script where I have and sqlserver Store procedure. this procedure gives me an output parameter. I then use this parameter to set a PLC tag and run a PLC sequence. my question is. is there a way to tied the PLC tags that i’m trying to write to the Store Procedure, meaning that if the SP is a success but then the Tag write fails then rollback everything? like if it was for example multiple SP in one transaction, if one fail then they all rollback together
