Simplest store procedure does not work in transaction manager :(

I am pretty sure i am doing something wrong but no idea what it is :frowning:
i was refreshing my knowledge about transaction manager from inductive university and there was an example which i simplified even more:
BEGIN
insert into test_valuetable(val,t_stamp) values (val,CURRENT_TIMESTAMP);
END


Transaction counter does execute without any errors but nothing gets written to the table test_valueatable
Can you please suggest anything to find out why ?
I tried various data types, int float double without any difference

strange that is says that there in no parameter with the name val :frowning:

I don’t have Transaction Manager available right now, but I can see that you have named both the column and variable as val. That may not go so well for you.

2 Likes

i change the name but sadly still no write to the database

I think the confusion is in how variables work in these Stored Procedure transaction groups. The parameter you should be selecting with that ‘Target Name’ field is a parameter defined in the Stored Procedure itself. Then, inside the Stored Procedure, the variable reference will use the @ syntax to denote itself as a variable.

Here is my example:

CREATE PROCEDURE testInsert @myVar int
AS
BEGIN
INSERT INTO test.dbo.test1 (myVal) VALUES (@myVar)
END

Then, the setup on the Ignition side is exactly the same as how you currently have it, with the Target Name of ‘myVar’ in my case. If you have setup the procedure correctly, you should have the option to select that variable from the dropdown.

1 Like

hi Keaton
Thanks for reply. I think you are correct i have some syntax issue with mariadb still which i need to figure out.