# Call MSSQL Stored Procedure from Gateway Event Script

**URL:** <https://forum.inductiveautomation.com/t/call-mssql-stored-procedure-from-gateway-event-script/45059>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [March 30, 2021, 3:27pm UTC](https://forum.inductiveautomation.com/t/call-mssql-stored-procedure-from-gateway-event-script/45059 "2021-03-30T15:27:42Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![mdemaris](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mdemaris/32/54639_2.png) [@mdemaris](https://forum.inductiveautomation.com/u/mdemaris)\
**Post date:** [May 16, 2023, 10:35pm UTC](https://forum.inductiveautomation.com/t/call-mssql-stored-procedure-from-gateway-event-script/45059/6 "2023-05-16T22:35:27Z")

</div>

Well, my last two posts here are under the wrong thread! 🤦‍♂️  
Here is my thread, and I will copy and paste these two posts to that thread.

> [@Calling Stored Procedure](https://forum.inductiveautomation.com/t/calling-stored-procedure/73809):
>
> I am attempting to call an SP using a button script event, and testing using a Named Query. Server: MSSQL Button Script: def runAction(self, event): item = self.parent.parent.getChild("Spacer\_1").getChild("Label\_0").props.text qtyLeft = self.parent.parent.getChild("FlexContainer\_2").getChild("QtyLeft\_1").props.value userName = self.parent.parent.getChild("FlexContainer\_2").getChild("Name\_1").props.text comments = self.parent.parent.getChild("FlexContainer\_2").getChild("Comments\_1").props.…

---

_[View the full topic](https://forum.inductiveautomation.com/t/call-mssql-stored-procedure-from-gateway-event-script/45059)._
