Chapter 13. Configuring Stored Procedures
Let's select the Payments (sp) object in the Query List, a shorter way of Data Connection Wizard.
We see the same points as for the view in the previous chapter:
- Foreign key values instead of names in columns and ribbon parameters;
- AccountID, CompanyID, and ItemID in columns and ribbon parameters;
- Unformatted table;
- No predefined table views.
- The ribbon parameters have no value lists.
- We can't save the changes.
We already know the way to solve the first group issues.
Here is a configuration for the validation lists to replace id to names:
Here is a configuration to change database column and parameter names to business ones:
Configuring ribbon parameters
To configure ribbon parameters, use the ParameterValues table of the payments-configuration workbook:
The configuration is like the known EventHandlers table.
Thus, we use master tables to select ID and Name pairs for the ribbon parameters of the stored procedure.
Configuring saving changes
Let's discuss this in the next important chapter.
Changing query objects using VBA
We have learned that the ribbon Query List allows changing query objects.
You can do this using the QueryObject method:
' Changing queries using Query List, Chapter 13 Sub Chapter13_1_ChangeQueryObject() ... Call addIn.ReloadQueryList(lo) addIn.QueryObject(lo) = "dbo67.uspPayments" End Sub
Be sure that the add-in loaded the query list configuration before.
You can use the ReloadQueryList method to reload it.