# Passing parameter into stored procedure

**URL:** <https://forum.inductiveautomation.com/t/passing-parameter-into-stored-procedure/18982>\
**Category:** Ignition\
**Created:** [July 26, 2018, 11:21am UTC](https://forum.inductiveautomation.com/t/passing-parameter-into-stored-procedure/18982 "2018-07-26T11:21:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![klbmcgregor](https://avatars.discourse-cdn.com/v4/letter/k/3be4f8/32.png) [@klbmcgregor](https://forum.inductiveautomation.com/u/klbmcgregor)\
**Post date:** [July 26, 2018, 11:21am UTC](https://forum.inductiveautomation.com/t/passing-parameter-into-stored-procedure/18982/1 "2018-07-26T11:21:54Z")

</div>

Hello,

I’m not sure of the correct syntax to pass two parameters into a stored procedure from a tag change event script.  
To pass a single parameter I have -

```
            varPassParameter = 15
	varSecondPassParameter = 25		
	
	# call the stored procedure
	call = system.db.createSProcCall("storedProcedure")
	call.registerInParam(1,system.db.INTEGER, varPassParameter)
	system.db.execSProcCall(call)

```

What is the correct syntax to pass the second parameter?

Thank you.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 26, 2018, 12:01pm UTC](https://forum.inductiveautomation.com/t/passing-parameter-into-stored-procedure/18982/2 "2018-07-26T12:01:02Z")

</div>

```auto
call = system.db.createSProcCall("storedProcedure")
call.registerInParam(1,system.db.INTEGER, varPassParameter)
call.registerInParam(2,system.db.INTEGER, varSecondPassParameter)
system.db.execSProcCall(call)

```

---

<div class="post-metadata">

**Author:** ![klbmcgregor](https://avatars.discourse-cdn.com/v4/letter/k/3be4f8/32.png) [@klbmcgregor](https://forum.inductiveautomation.com/u/klbmcgregor)\
**Post date:** [July 26, 2018, 12:49pm UTC](https://forum.inductiveautomation.com/t/passing-parameter-into-stored-procedure/18982/3 "2018-07-26T12:49:30Z")

</div>

Great, thank you for the response!
