1.2k questions
1.4k answers
361 comments
339 users
Here is some example code you can use:
// Create the pQuery object with the stored procedure to be called var pQuery = qie.getParameterizedQuery("CALL GetImmediateManager(:employeeId, :managerIdOut)"); // Set the values for the input parameters pQuery.setInt("employeeId", 7); // Register the output parameters pQuery.registerOutputInt("managerIdOut"); // Execute the stored procedure var queryResult = pQuery.doQuery("mariadb"); // Get the value from the registered output parameter qie.debug(pQuery.getOutputParameter('managerIdOut'))
// Create the pQuery object with the stored procedure to be called var pQuery = qie.getParameterizedQuery("CALL GetImmediateManager(:employeeId, :managerIdOut)"); // Set the values for the input parameters pQuery.setInt("employeeId", 7);
// Register the output parameters pQuery.registerOutputInt("managerIdOut"); // Execute the stored procedure var queryResult = pQuery.doQuery("mariadb"); // Get the value from the registered output parameter qie.debug(pQuery.getOutputParameter('managerIdOut'))
Another Example:
// Create the pQuery object with the stored procedure to be called var pQuery = qie.getParameterizedQuery("call get_employee_age(:employeeId)"); // Set the values for the input parameters pQuery.setInt("employeeId", 17); // Execute the stored procedure var queryResult = pQuery.callStoredProcedure("mariadb"); qie.debug(queryResult[0].getNode("/"));