# Stored procedure group parameter parse error

**URL:** <https://forum.inductiveautomation.com/t/stored-procedure-group-parameter-parse-error/15336>\
**Category:** Ignition\
**Created:** [September 13, 2017, 10:39pm UTC](https://forum.inductiveautomation.com/t/stored-procedure-group-parameter-parse-error/15336 "2017-09-13T22:39:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![richardNZ15](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/richardnz15/32/33373_2.png) [@richardNZ15](https://forum.inductiveautomation.com/u/richardNZ15)\
**Post date:** [September 13, 2017, 10:39pm UTC](https://forum.inductiveautomation.com/t/stored-procedure-group-parameter-parse-error/15336/1 "2017-09-13T22:39:40Z")

</div>

I have set up a very simple stored procedure in HeidiSQL to update a value in a row based on a single input parameter.

```auto
CREATE DEFINER=`ignition`@`%` PROCEDURE `ProofTestFailure`(IN `SerialNumParam` BIGINT)
	LANGUAGE SQL
	NOT DETERMINISTIC
	MODIFIES SQL DATA
	SQL SECURITY DEFINER
	COMMENT 'Set all timber pieces ProofTestStatus to "OnHold" if test fails'
BEGIN
UPDATE FinishedPieces SET ProofTestStatus = 'On Hold' WHERE SerialNum = SerialNumParam;
END

```

The only input parameter is “SerialNumParam” with a Datatype of BIGINT and context set to IN

I’ve set up a pretty straight forward Stored Procedure Transaction Group as below:

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/f/fb595a84e32f69bfd94a6d901945a18f99bd0faf.PNG)

When i trigger it i get the following error:

```auto
Error forwarding data: cannot parse parameter definition :IN `SerialNumParam` BIGINT
java.sql.SQLException: cannot parse parameter definition :IN `SerialNumParam` BIGINT
	at org.mariadb.jdbc.CallableParameterMetaData.readMetadata(MySQLCallableStatement.java:199)
	at org.mariadb.jdbc.CallableParameterMetaData.readMetadataFromDBIfRequired(MySQLCallableStatement.java:63)
	at org.mariadb.jdbc.CallableParameterMetaData.getParam(MySQLCallableStatement.java:246)
	at org.mariadb.jdbc.CallableParameterMetaData.getName(MySQLCallableStatement.java:287)
	at org.mariadb.jdbc.MySQLCallableStatement.nameToIndex(MySQLCallableStatement.java:501)
	at org.mariadb.jdbc.MySQLCallableStatement.setObject(MySQLCallableStatement.java:883)
	at org.apache.commons.dbcp.DelegatingCallableStatement.setObject(DelegatingCallableStatement.java:247)
	at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper$SRCallableStatement.setObject(SRConnectionWrapper.java:1458)
	at com.inductiveautomation.factorysql.groups.storedprocgroup.SPHistoricalData.storeToConnection(SPHistoricalData.java:116)
	at com.inductiveautomation.ignition.gateway.history.sinks.RecordDatasourceSink.storeDataToDatasource(RecordDatasourceSink.java:39)
	at com.inductiveautomation.ignition.gateway.history.sf.sinks.AbstractDatasourceSink.storeToDatasource(AbstractDatasourceSink.java:135)
	at com.inductiveautomation.ignition.gateway.history.sf.sinks.AbstractDatasourceSink.storeData(AbstractDatasourceSink.java:113)
	at com.inductiveautomation.ignition.gateway.history.sf.sinks.AggregateSink.storeData(AggregateSink.java:160)
	at com.inductiveautomation.ignition.gateway.history.forwarders.ForwarderThread.run(ForwarderThread.java:156)

```

I am using the MariaDB JDBC driver.

---

<div class="post-metadata">

**Author:** ![richardNZ15](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/richardnz15/32/33373_2.png) [@richardNZ15](https://forum.inductiveautomation.com/u/richardNZ15)\
**Post date:** [September 13, 2017, 10:42pm UTC](https://forum.inductiveautomation.com/t/stored-procedure-group-parameter-parse-error/15336/2 "2017-09-13T22:42:32Z")

</div>

Managed to get it to work by using parameter number, not name. Which was 1 in my case.

Is it possible to get the stored procedure to execute multiple times for different input parameters in the same Transaction group?  
Ideally i’d like to provide 10 opc tags with different SerialNumbers and the stored procedure would be executed for each one.  
Currently with multiple items only the last tag in the Group Items is used for calling the procedure i believe.
