Microsoft KB Archive/94420

{|
 * width="100%"|

ACC1x: Error Message When Attaching Btrieve Table

 * }

Q94420

-

The information in this article applies to:


 * Microsoft Access 1.0

-

SYMPTOMS
When you try to attach a Btrieve table in Microsoft Access, you receive the following error message:

is corrupted or isn't a Microsoft Access database.

CAUSE
When Microsoft Access attaches a Btrieve table, it compares information in the Xtrieve dictionary file (FILE.DDF) with information in the TBLNAME.DAT file. The most common reasons for the above error message are differences in index information.

RESOLUTION
Redefine the Btrieve index so that it is exactly the same length as the field it indexes.

STATUS
This problem does not occur in Microsoft Access version 1.1.

MORE INFORMATION
In the Btrieve file format, the length of the index may not match the length of the field. This is a valid condition. The Xtrieve dictionary file (FILE.DDF) ignores these indexes, but Microsoft Access interprets them as invalid and returns the above error message.

You can correct this problem by turning the invalid indexes into valid indexes. Use one of the following options to ensure that the length of the index and the length of the field are identical:


 * Ask the vendor who created the Btrieve files to change the length of the index.
 * Use Btrieve or Xtrieve to redefine the index.
 * Use any third-party utility available to modify the Btrieve index.

The following four examples all require changes to the Btrieve index:

Example 1
The TBLNAME.DAT file is defined with the following three columns:

   Column name   Field Length    Index Length --   Firstname     10              <= Combined length of    Lastname      10              <= 20 characters Company      25

Index1 is defined with a length of 20 characters, the combined length of the Firstname and Lastname fields.

Resolution: Redefine the Btrieve index into one multiple-segment index, giving each segment a defined length of 10 characters.

Example 2
The TBLNAME.DAT file is defined with the following three columns:

   Column name   Field Length    Index Length --   Firstname     10              4 characters Lastname     10 Company      25

Index2 is defined with a length of four characters, shorter than the defined length of the Firstname field.

Resolution: Redefine the Btrieve index on Firstname. Give it a 10-character length, matching the size of the Firstname field.

Example 3
The TBLNAME.DAT file is defined with the following three columns:

   Column name   Field Length    Index Length --   Firstname     10              12 characters Lastname     10 Company      25

Index3 is defined with a length of 12 characters, slightly longer than the defined length of the Firstname field.

Resolution: Redefine the Btrieve index on Firstname. Give it a 10-character length, matching the size of the Firstname field.

Example 4
The TBLNAME.DAT file is defined with the following two columns:

   Column name   Length Firstname -  10 Lastname -   10 Company  -   25

Index4 is defined on a numeric byte range index. There is no index defined on any field in the table.

Resolution: Remove the numeric byte range index completely, then redefine the index on an existing field. Be sure that the length of the index matches the length of the indexed field.

Btrieve and Xtrieve are manufactured by Pervasive Software, a vendor independent of Microsoft; we make no warranty, implied or otherwise, regarding these products' performance or reliability.

Keywords : kb3rdparty kberrmsg

Issue type : kbprb

Technology :