Upgrading to Apollo 9

<< Click to Display Table of Contents >>

Navigation:  Apollo VCL Components > Getting Started >

Upgrading to Apollo 9

The following section contains important information that will assist you with porting existing Apollo applications to Apollo 9.x.

Upgrading from Apollo 7.x

Find references to SDE7 and replace with ApoEngInt

Recompile your projects

Upgrading from Apollo 6.x or 5.x

Find references to SDE61, SDE6, SDE51, SDE5, SDE32 and replace with ApoEngInt

Make sure your Library path for RAD Studio/Delphi/C++Builder and your Project are referring to the appropriate sub-directory under the Apollo 9 installation folder:
 
e.g.
C:\Apollo\9.9\x86\VCL\D10
C:\Apollo\9.9\x64\VCL\D10

Recompile your project

Upgrading from Apollo 4.5.x or 4.6.x

image\tip.gif TApolloDataSet has been renamed to TApolloTable. For backward compatibility, a TApolloDataSet component is included which inherits directly from TApolloTable. To insure compatibility with future releases of Apollo, you should change all refrences to TApolloDataSet in your code to TApolloTable.

All global environmental settings have been moved from TApolloDataSet into a new component called TApolloEnv. This component is very similar in use to its same-named component from Apollo 4.0x.

When loading existing project with this new component set, you will get warnings about some properties missing from the new TApolloTable – since they've been moved to TApolloEnv. Just drop a single TApolloEnv onto your project and make the same settings, if any, there.

There is nothing to prevent you from dropping more than a single TApolloEnv into the same project, but you only need one. And, if you do happen to have more than one on there, they will properly respect each other's settings and changes dynamically.

1) TApolloDataSet.HideDeleted is now TApolloEnv.Deleted

The TApolloTable.HideDeleted property has been moved and renamed to TApolloEnv.Deleted. This property toggles the global display of deleted records in tables. If True, deleted records are not displayed.

Now that we have moved the environmental 'HideDeleted' over to TApolloEnv, we can (and have) renamed it back to the original Deleted again. So, to hide or show deleted records in the table, you would now set the TApolloEnv.Deleted property rather than TApolloTable.HideDeleted.

2) TApolloTable.SetTranslate is now TApolloEnv.OEMTranslate

TApolloTable.SetTranslate is now a property called OEMTranslate. Set to True for full compatibility with DOS application data.

Follow these steps to migrate your project to the new Apollo:

Backup your source files

Load your project in Delphi or C++Builder, clicking the "Ignore All" button when it warns you of unrecognized property values. The project will continue to load.

All TApolloDataSet components will have been replaced with the new TApolloDataSet 'stub' component with a red circle through it. This allows you to see which components require conversion.

Right click on all .DFM files that have a TTableDataSet, and select "View as Text", or press Alt-F12.

Viewing the.DFM as text, search and replace all instances of "TTableDataSet" with "TApolloTable".

Right-click and select "View as Form", or press Alt-F12. The TTableDataSet components will have been replaced with TApolloTable components.

Do the same search and replace for the .PAS files.

At this point, try compiling the project. You may see various compiler errors due to some naming differences in properties and methods from TApollo to TApolloTable, but the conversion is now fairly complete.

Visual Steps to Conversion

image\VCLcvrt1.gif

Open your form and press Alt-F12, or right-click and select "View as Text"

 

image\VCLcvrt2.gif

Rename TApolloDataSet to TApolloTable

image\VCLcvrt3.gif

Rename TApolloDataSet to TApolloTable for each instance of TApolloDataSet.

Press Alt-F12 again, or right-click and select "View as Form"

image\VCLcvrt4.gif

Your TApolloDataSet components should now be TApolloTable components. Be careful that the component names have not been changed (i.e. ApolloDataSet1, etc.) You may optionally rename these components but be sure to update all source code that references these components with the new names.

 

image\VCLcvrt5.gif

Open to your PAS file source code and search for TApolloDataSet.

 

image\VCLcvrt6.gif

Rename to TApolloTable throughout.

Save and compile. You may need to add ApoEngInt to your uses clause, but for the most part, your conversion should be complete.

Upgrading from Apollo 4.x

The Apollo 4.0x release used a completely different methodology from Apollo 6.0 to connect Apollo's database engine to Delphi's data-aware controls. Instead of a TApolloTable component which replaces TTable, Apollo 4.0x used a TApollo component which was then connected to a TTable.

When loading a project created using Apollo 4.0x components, you may receive a warning dialog indicating that the TableType values used in your TTable components are not recognized. This is because under Apollo 5.x and 6.x, the original TTable component is not used, thus the Apollo TableType values (ttSXFOX, ttSXNSX, and ttSXNTX) are now on TApolloTable.TableType, and TTable is back to it's default Delphi configuration.

Follow these steps to migrate your project to the new Apollo 6.0 component set:

Backup your project source files.

Load your project in Delphi or C++Builder, clicking the "Ignore All" button when it warns you of unrecognized property values. The project will continue to load.

All TApollo components will have been replaced with the new TApollo 'stub' component. This component looks like the original TApollo component (lunar-lander) except that it has a red circle with a line through it. This component has no functionality whatsoever and is simply provided to allow your project to load, and allows you to see the old TApollo property settings that will need to be applied to the new TApolloTable components.

Right click on all .DFM files that have a TTable, and select "View as Text".

Viewing the.DFM as text, search and replace all instances of "TTable" with "TApolloTable".

Right-click and select "View as Form". The TTable component will be replaced with new TApolloTable components.

If you used the ExtraIndexes property in TApollo, you will need to copy those values to the new corresponding TApolloTable component.

Delete the TApollo stub components.

Do the same search and replace for the .PAS files.

Your .PAS files will include references to the old TTable objects as well as the old TApollo objects (such as Table1, Table2, Apollo1, Apollo2, etc...). You can merge these pairs into one. For example, search and replace all occurrences of both "Table1" and "Apollo1" to "ApTable1", and so on.

At this point, try compiling the project. You may see various compiler errors due to some naming differences in properties and methods from TApollo to TApolloTable, but the conversion is now fairly complete.