Pervasive logo

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:

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:

  1. Open on the Databases namespace node under a machine in the Control Center namespace tree.
  2. Right-click on the desired database in the namespace.
  3. Select Tasks, then Null Conversion in the shortcut menu.
  4. 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 Box

Click the check box under the Convert column for those tables that are to be converted. Click Next when done.

  1. 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.

  1. 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 Box

To stop the operation, click Cancel. To continue, click Convert.

  1. Finally, the Null Conversion Wizard indicates that the selected tables were converted successfully (not shown).

Prev
Rebuild Utility Tasks
Contents
Up
Check for Revisions
Next
Description Files