I am trying to insert the values of some input fields into a SQL table via a Stored Procedure…
I keep getting “1st arg can’t be coerced” error, I am assuming I am running into an issue with the input values not being the same type as the SQL Fields they are going into…
Here is my call to the Stored Procedure
system.db.execSProcCall("EXEC Site.dbo.spSetTagValues @TagID = event.source.parent.getComponent('TagIDtxt').text @OrderNumber = event.source.parent.getComponent('OrdNumfld').intValue @LotNumber = event.source.parent.getComponent('LotNumtxt').text @Quantity = event.source.parent.getComponent('Qtyfld').intValue @ParentID = event.source.parent.getComponent('ParentIDtxt').text")
Name Ignition Data Type SQL Data Type
TagIDtxt Text NVARCHAR(50)
OrdNumfld Value (Integer) INT
LotNumtxt Text NVARCHAR(50)
Qtyfld Value (Integer) INT
ParentIDtxt Text NVARCHAR(50)
I am sure I am missing something simple, just need a pointer in the correct direction… Thanks