How to Call a SQL Stored Procedure (Mssql) in mendix

0
I'm trying to call a stored procedure from a Microsoft SQL Server database using the "Execute Callable Statement" functionality. Unfortunately, I'm facing some syntax errors, and I'm struggling to resolve them. Please find below the screen print of what I am trying to do. But I am getting an error, could anyone please advice. Thank you.  
asked
2 answers
1

Hello Esther,

 

The action expects an argument of databaseconnector.statement, so you need to provide here an object of entity Statement so it will be only a a dollar signed variable of type statement $Statement, but you need to fill in a value for the statement and that you can do by adding a change action in your flow and adjust the attribute content of the statement object, do this before your databaseconnection action and it should work.

 

So create/retrieve Statement object, change statement object, fill in reference to statement object

 

Hope this helps,

 

Good luck!

 

image.png

image.png

answered
1

Hey Esther,

Here is answer to follow up (it's not possible to add picture to comment)

here is just example how can you call store procedure (store procedure calling to other store procedure) from Execute parameterized statement (this is just dummy data, example is for Oracle db but it's should be pretty similar for Mssql)

image.png

answered