Modifying extgen_ methods
When a modified (extgen_) stored procedure method becomes out-of-date, you can use this
procedure to update it and bring it into agreement with the current base stored
procedure method.
-
Open the EXTGEN Listing form.
The top part of the form displays a list of all extgen_ methods currently in the system. Colored icons indicate the status of each extgen_ method:
- A green icon indicates that the extgen_ method is in accord with the base method. No further action is needed.
- A yellow icon indicates that the Modified Date on the base method is more recent than the Modified Date on the extgen_ method. This means that there are base code differences between the two versions that need to be reconciled.
- A red icon indicates that there is no corresponding base method for the
extgen_ method.
This means one of two things:
- The base stored procedure no longer exists in the database.
- The base stored procedure has been replaced by a custom assembly class extension.
When this is the case, you must research the cause and take appropriate action in order for your extgen_ method to work: You can replace your extgen_ method with a custom assembly class extension that accomplishes the same thing (recommended); or you can modify your extgen_ as appropriate.
Note: The rest of this procedure applies to entries with a yellow icon. -
Select an entry that displays a yellow icon.
The bottom section of the form displays basic information about the extgen_ method.
-
Optionally, to view the actual code for the extgen_ method, click View.
The code displays in the unlabeled text box.
-
To launch the Edit Stored Procedure form and update the
extgen_ code, click Edit Stored
Procedure.
The Edit Stored Procedure form opens, populated with the name of the selected extgen_ method.
-
On the Edit Stored Procedure form, click Compare w/ Base.
This launches the Method Compare form. The left panel displays the code for the base method. The right panel displays the code for the extgen_ method. Any differences between the two versions are highlighted in red text (left panel only).
-
Optionally, to merge base code that is not included in the extgen_ code, use
the Next Diff or Previous Diff options to locate and select
differing code in the base method. Then click the "Merge" button on section of
highlighted base code.
The "Merge" button is a very small gray button that displays at the far left of the first line of highlighted base code. When you click this button, that section of the base code is merged into the extgen_ code.
- Optionally, you can also add, edit, or remove code from the extgen_ method to suit your needs, by double-clicking inside the right panel and editing the code directly.
-
When you are finished adjusting the extgen_ code, click OK.
This returns you to the Edit Stored Procedures form and displays the edited code in the text field.
-
Review the code changes, and optionally, double-click inside the editable
workspace to make any additional edits you want.
Note: You cannot actively and iteratively test your code in this workspace. We recommend that you test your code in a local SQL test environment before submitting it to the database.
-
When you are satisfied the code is what you want, click Submit.
This action replaces the old extgen_ code in the database with the new code.
- Optionally, refresh the EXTGEN Listing form and verify that the extgen_ method now displays a green icon.