Error execute statement database connector calling a store procedure
Hi colleagues, I am trying to call a sql store procedure from the execute statement action of the database connector. Calling from sql management works fine but from Mendix, I get this error. Really the error is produced by the last sentence SELECT @return_value, but I need it to get the identity that the store procedure has generated. Repeat, in sql management works fine but not in Mendix. Is there another way to get this value? Thanks in advance. Mario.
Mario Escribano Estoquera
HI Mario Escribano Estoquera,
As far as i know, we can Execute Stored procedures that do not have a Return value. The Return value of the java action is the number of affected rows and not the data itself.
Not a Good Suggestion but might be a workaround and the only way I can think of if you want to achieve it. You can create another where you push return data and in the same microflow try to use the Synchronization module to fetch the data from the new table ( if external database).
The question is that returns a list and not a unique value. I’ve resolved doing a execute query and handling the list result.