skip to main content
Part 3: The 32-Bit Drivers : The Btrieve (Pervasive.SQL) Driver : Defining Table Structure
  
Defining Table Structure
Because Btrieve does not store any column information in the data file, you may need to define its structure. Tables created by the Btrieve driver or by Scalable SQL will not require this. Utilities are also available from Pervasive Software that will perform this operation.
To define the structure of a file:
1. Display the ODBC Btrieve Driver Setup dialog box through the ODBC Administrator. Click the Advanced tab; then, click Define to display the Define File dialog box.
The Btrieve Define File dialog box
2. In the Define File dialog box, select the file you want to define and click Open to display the Define Table dialog box.The Btrieve Define Table dialog box
Database Name: This field displays the directory in which the file you selected in the Define File dialog box is located.
File: This field displays the name of the file that you selected in the Define File dialog box.
Table: Type the name of the table to be returned by SQLTables. The name can be a maximum of 20 characters and cannot be the same as another defined table in the database. This field is required.
3. Specify values in the following fields to define each column. Click Add to add the column name to the list box.
Name: Type the name of the column.
Type: Select the data type of the column.
Length: Type the length of the column, if applicable.
Scale: Type the scale of the column, if applicable.
4. To modify an existing column definition, select the column name in the list box. Modify the values for that column name; then, click Modify.
5. To delete an existing column definition, select a column name in the list box and click Remove.
6. Click OK to define the table.