Prev | Advanced Operations Guide | Next |
Null Conversion
The Null Conversion Utility adds or removes support for nullable columns in Pervasive.SQL tables. The utility allows users to:
- Convert legacy tables into Pervasive.SQL V8 format
- Change not-nullable columns to nullable
- Change nullable columns to not-nullable
In Pervasive.SQL V8, null values are added as an extra byte to the default record. If you set this extra byte as any value other than zero, it is designated as null. This extra byte can be used to define the index. If a field is not defined as nullable, no extra bytes are added.
Note
There are a maximum number of segments allowed per file. In Pervasive.SQL V8, true null columns contain two segments per index. Therefore, it is important to keep in mind that defining null values doubles the number of segments used. See the Pervasive.SQL Programmer's Guide for more information about maximum Btrieve segment sizes.
Note
In a case where a user converts an existing table with legacy nulls and the null values differ from the defaults, the Null Conversion utility will allow the user to specify which value(s) should be considered null for each column.
Caution
Do not run this utility on data files that are accessed by older Btrieve applications. Doing so can make the data unusable to the older application unless the underlying application code is changed.
The Null Conversion utility is implemented as a wizard with the Pervasive.SQL Control Center framework.
To convert a table's nullable fields:
- Open on the Databases namespace node under a machine in the Control Center namespace tree.
- Right-click on the desired database in the namespace.
- Select Tasks, then Null Conversion in the shortcut menu.
- The wizard presents a dialog box in which the user can specify which tables in the database are to undergo null conversion.
Figure 15-8 Null Conversion Wizard Dialog BoxClick the check box under the Convert column for those tables that are to be converted. Click Next when done.
- Next, the wizard presents a dialog box allowing the indication of which fields are currently nullable. These values may be changed at this time.
Figure 15-9 Null Conversion Wizard - Specify Columns for Conversion Dialog Box
Note
Some data types are not nullable, such as BIT and AUTOINC.
- Before changes are committed to the database the following dialog box displays the actions that are to be taken.
Figure 15-10 Null Conversion Wizard - Completing Dialog BoxTo stop the operation, click Cancel. To continue, click Convert.
Prev Rebuild Utility Tasks |
Contents Up Check for Revisions | Next Description Files |