What can I do to resolve this?
My script for the Delete button running onClick()
||MyText = self.parent.parent.getChild(Table).props.selection.data.id
||ID = MyText
My message box returns 4, and that is the row I selected in the table. Before pressing the Delete Button.
SQL is getting this from Ignition:
exec sp_executesql N’DELETE FROM [dbo].[LotMaterial] WHERE id = @P0 ‘,N’@P0 nvarchar(4000)',NULL
whoops: Found the issue.
ID is lower case in the Named Query.
DELETE FROM [dbo].[LotMaterial]
WHERE id = :id
Good work. I think we would have needed to see the query to be able to help.
Tip: use the </> button when pasting code - not the ‘
>’ quotation syntax. You can use the 🖉 edit link to fix your post.
It sounds like you got it working, but I would have expected these to be problems too:
Path of the named query needs to be in quotes.
Parameter name needs to be in quotes (this assumes you defined a paramter called
ID in your named query).