Hi Peter Simpson,
What I am talking here is NOT about executing/calling a stored procedure to insert data to the table OR calling a stored procedure to retrieve some records from a table. It's about using the OUT parameter in stored procedure and accessing its value from B4A app.
Are you able to get/read the OUT parameter value of Stored Procedure from B4A app ?
If you don't mind, can you show a sample code using this lib
There are various usage for the OUT parameter in a stored procedure. One among other uses of this can be for eg:-
A user try insert data to the table. The stored procedure based on certain conditions may OR may not insert the data to the table. The OUT parameter can be used to read the status of the operation ie you can send a string for eg. "Did not insert the data to the table because the customer is a defaulter in payments" OR a message "Did not add because this customer belongs to Platinum segment" OR "Added the customer successfully".
So in the front end application we don't have to complicate the code. We just need to make a call to the storeprocedure CALL Test("CustomerID", "CustomerName",@Result)
We just have to read the the value of the variable "Result" to know the status of the operation.
Hope you understand.
Regards
Anser
Hello @Anser,
I've just checked this library version 0.36 with Stored Procedures and I found that it works 100% perfect with both inserting and extracting of data to and from one of my MySQL databases with the Call statement.
I hope that this helps you...
What I am talking here is NOT about executing/calling a stored procedure to insert data to the table OR calling a stored procedure to retrieve some records from a table. It's about using the OUT parameter in stored procedure and accessing its value from B4A app.
Are you able to get/read the OUT parameter value of Stored Procedure from B4A app ?
B4X:
CALL GetCustomerLevel(103,@level);
SELECT @level AS level;
- Showing how to call a stored procedure with an OUT parameter using this lib
- How the OUT value is retrieved after executing the stored procedure.
There are various usage for the OUT parameter in a stored procedure. One among other uses of this can be for eg:-
A user try insert data to the table. The stored procedure based on certain conditions may OR may not insert the data to the table. The OUT parameter can be used to read the status of the operation ie you can send a string for eg. "Did not insert the data to the table because the customer is a defaulter in payments" OR a message "Did not add because this customer belongs to Platinum segment" OR "Added the customer successfully".
So in the front end application we don't have to complicate the code. We just need to make a call to the storeprocedure CALL Test("CustomerID", "CustomerName",@Result)
We just have to read the the value of the variable "Result" to know the status of the operation.
Hope you understand.
Regards
Anser
Last edited: