4D v13.4Converting databases from previous versions |
|||||||||||
|
4D v13.4
Converting databases from previous versions
Converting databases from previous versions
Databases created with previous versions of 4D are compatible with 4D v13 (structure and data files).
Note: You can convert any interpreted structure file. The file may contain compiled code; in this case, you will need to recompile the database after its conversion. A database from version 11 or 12 gets converted directly when you open the structure file with 4D v13. Two successive warnings let you know that the files are being converted and that you can no longer open them with an earlier version. Note that when you convert a data file, its indexes are rebuilt. Note: If you want to convert a v11 database that uses an earlier version of 4D Pack, we reconmmend that you install the most recent version of the 4D Pack v11 plug-in in the original database before proceeding with the conversion. The "Macros.xml" file lets you use macro commands in the Method editor (see Creating and using macros). It is located in the user preferences folder:
In version 12 of 4D, there are new macro commands available. Since the "Macros.xml" file may have been customized, when you install a new version 4D does not automatically replace the existing version of this file. To use the new SQL macro commands of 4D v12, you must either:
4D v13 can open v12 or v11 components (compiled or interpreted) directly without conversion or a confirmation dialog box. Remember that components are always open in read-only mode. You do not need to recompile components but conversion to v13 is only possible for .4DB files and not for .4DC ones. The table below presents the retro-compatibility scenarios for the files of 4D databases that are converted into v13, i.e. the possibility of opening them again in previous versions:
(*) You can still open the converted data file in version 12 by explicitly allowing this on the version 12 side. This is done using the Allow opening v13 data files preference found on the “Database/Data Management” page of the Database Settings: By default, the No option is selected. You can choose Yes to allow data to be opened directly or Ask in order to display a confirmation dialog before opening the data. This option is intended for recovering data in specific cases and should be used with precaution:
Structural changes made at the 4D database engine level require in-depth conversion of both the structure and data of earlier databases using a specific wizard when converting to versions 11 and 12. As a precaution, this wizard makes a copy of the original database before converting it so you can revert to it any time. You can convert any interpreted structure file. The file may contain compiled code; in this case, it will be necessary to recompile the database after conversion. To convert a previous database, simply select it in the opening dialog box of 4D (see Opening a local database). The conversion wizard appears automatically: Click on the Convert database button to start the standard process for converting the structure and data files. You can also display or modify the default parameters used for conversion by clicking on the Details > button (see the following paragraph). The original files are copied into a folder named Replaced Files (Conversion), which is created next to the original files. If the data file is in the same folder as the structure file, the Replaced Files (Conversion) folder will contain both original files. If the data file is in another folder or on another volume, the conversion will create a Replaced Files (Conversion) for each file. Note: The current log file of the converted database is also copied into the Replaced Files (Conversion) folder and a new blank log file is created. If the wizard encountered any non-critical errors during conversion, they will be recorded in a conversion log file named DataConversion_Log.log that will be placed next to the converted structure. Any older or obsolete mechanisms that are no longer supported are removed or replaced during conversion. For more information, refer to the 4D v11 SQL Upgrade (PDF). For a detailed description of all the modifications, refer to the Conversion to 4D v11 SQL (PDF). If you want to view or change certain parameters before carrying out the conversion, click on the Details > button. The dialog box then displays various information concerning the conversion parameters. You can open the different pages of information by clicking on the corresponding areas:
After conversion, in addition to the .4DIndy and .4DIndx index files, 4D databases will contain the following additional elements:
If the database that you want to convert uses several different data files, the conversion of the database and each of the data files will be performed separately. Conversion of additional data files is carried out using the Open>Data File command of the File menu.
It is not possible to convert a structure file containing a previous generation component (prior to version 11). It is imperative to uninstall any components using the corresponding version of 4D Insider (utility available up to version 2004) before proceeding with the conversion of a structure file. For more information about “new generation” components, refer to Developing and installing 4D components. Starting with 4D v12, the data file size is virtually unlimited (except for the limits imposed by the operating system) so you can no longer create or use data segments. When you convert an older database that contains segments, the conversion wizard groups the contents of all the segments into a new data file. You must make sure that you have a sufficient amount of disk space for the new data file. The segments of a database can be seen on the “Segment Information” page of the conversion dialog box (see the “View or change conversion parameters” paragraph above. If a segment is missing during conversion, the conversion wizard lets you indicate its location manually. If the segment cannot be located, conversion cannot take place. When converting a database to version 12, textual data are converted into Unicode. In order for the conversion to be performed correctly, 4D must know the source character set. By default, the character set corresponding to the current system language is used. It is up to the developer to explicitly declare the specific character sets used before conversion, via a text file placed at the same level as the data file to be converted. This file must have the following characteristics:
Example:
|
PROPERTIES
Product: 4D TAGS Catalog.xml, UUID*** |
|||||||||