How to Call a Stored Procedure with One Input and Return Value Using Database Connector?
0
Hi everyone, I'm working with the Database Connector module in Mendix and need to call a SQL Server stored procedure named: SQL dbo.sync_worker_data This procedure: Takes only one input parameter (w_no) Returns an integer value using the RETURN keyword Cannot be modified — it does not support output parameters What I’m trying to achieve: Pass a single input parameter Capture the return value from the stored procedure My questions: Is there any way to capture a stored procedure’s return value using ExecuteCallableStatement in Mendix? Since I cannot modify the procedure to use an OUTPUT parameter, is there any workaround to retrieve the return value? Has anyone successfully implemented this pattern in Mendix with SQL Server? Any help or examples would be greatly appreciated! Thanks, Lasya
asked
Lasya Priya Yelishetti
1 answers
1
Hi Lasya,
Just add the output parameter in your SQL Server stored procedure, or if you want an actual return value, you need to add some Java action to call the procedure.