Data
ID #1045
How to convert data file to new structure?
If a file's definition needs to be changed and meaningful data exists, follow these steps to convert the file. This method creates an executable file that you can ship to end users to convert their data files. If you want to convert a file without creating a file conversion program see How to Convert a File (without generating source).
- Open the dictionary that contains the file to be modified.
- Copy the data file definition to a new name. To copy a file definition, highlight the file to be copied in fhe Files List and press CTRL+C, then press CTRL+V to paste it. You will be prompted to supply a new name and prefix. (Example - copy Customer to OldCustomer)
An alternative would be to copy the entire dictionary to a new name. You might use this method if there are multiple files to be converted in one session. Clarion allows files to be converted from one dictionary to another.
- After the file definition has been copied, make any necessary changes (add fields, change the file driver type, etc.) to the definition with the original name. In our example above, the Customer file is the file to be modified.
- Save the Dictionary after file modification and close it.
The Dictionary file must be closed in order to use it for file conversion.
- Load the file in the Database Manager File utility (File » Open, Database Tab)
- Navigate to the file to convert, then select it. You are prompted to specify a file driver
- Select the file's driver from the drop-down list. The Database Manager opens the file and displays it's contents.
- Choose File » Convert File (or press CTRL+V).
The File Convert dialog appears, prompting for the information below:
- In the Target Filename field, specify the name of the new file. This defaults to the current file name Specify a different name if you have not backed up your data file.
- In the Target Dictionary field, specify the dictionary which contains the file definition to which to convert.
- In the Target Structure field, specify the structure within the target dictionary which defines the target file.
- In the Generated Source field, specify the file name for the generated source code or accept the default of CONVERT.CLW.
Tags: data file conversion
Related entries:
- How to prevent running of Application Wizard creating new application?
- How to see fields of tables located in main DLL for specified debugged DLL in multi-dll projects?
- How to run application that will not be displayed in task bar?
- What is INNER join?
- How to set variable name for data file in the dictionary?
Last update: 2007-07-13 16:04
Author: SoftVelocity
Revision: 1.0
You can comment on this entry