Calling MySQL stored procedures
Stored procedures are similar to functions, except they can return a recordset. You cannot modify the returned records, but they are ideal for populating ListBoxes, ComboBoxes, and VBA read-only recordsets. Let's populate some dropdowns using stored procedures in the next exercise.
Exercise 10.03 – Calling a MySQL stored procedure
We are working on SQL 7
for the next exercise and activity. SQL 7
comprises three separate queries populating the three dropdowns on the main form. This exercise will work through one of them, the Series dropdown. Follow these steps to complete this exercise:
- Locate the VBA code for
SQL 7
. - Create a SQL file and name it
Create Procedure spSeriesList.sql
. - Type the following code to use a target database:
USE ms_access_migration;
- Delete the stored procedure if it exists, as follows:
DROP PROCEDURE IF EXISTSÂ Â spSeriesList;
- Set up a custom delimiter. This tells MySQL that everything...