Using parameters
Up to now, we have only been dealing with extracting results from the database as either single values or as complete, unfiltered lists as defined by the SQL statements, functions, and stored procedures. However, we often need to filter the data to get the results required for processing in VBA or to populate controls such as drop-down lists. We filter the data by passing in parameters to the SQL statements, stored procedures, or functions. The following exercise will step through creating a stored procedure to accept a single parameter—the group that the user has selected. The stored procedure will then query the database using the filter to return a list of series relating to the group and pass back the results to VBA to display the list in the Series dropdown.
Parameterized stored procedures
Most SQL statements in MS Access that you are converting to MySQL have parameters that make them flexible. You can use the same parameters in your stored procedures...