Status 22 errors are usually caused by a mismatch of the DDFs and the data files. For example, if the DDFs define a record that is 100 bytes but the Btrieve file has a record size of 110 bytes, the status 22 will occur. THat's the main cause of the status 22 when dealing with ODBC.
I would suggest a Check Database run on the database. This can be found on the Tasks menu of the database within the PCC. mirtheil@mirtheil.com
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician