Hi,

Firstly let me tell you that I am pretty young in the Pervasive calendar...
We had recently moved to Pervasive 2000i from Pervasive 7.0 and have been facing problems following that...
We are having the problem of the DDFs not matching the bteive files we have. I had run the consistency test on my database and most of the tables had inconsistency or Record length mismatches. I could decipher that for the fixing of the above problem, I will have to update our DDF files.
I had thought of reconstruncting the DDF files rather then updating the existing ones.

I had cornered two options:

1. Using a third-party DDF Creator for making new DDFs for my database.

2. Creating a new database with tables that are made using the existing 'btrieve' files, so that the 'File/Field/Index.DDF's get populated and the DDFs are created accurately.

Following up with the second option, I have created a new Database, and the basic DDFs have been created along with it.
Now, to update the DDFs with the definition of the tables, I have decided to build SQL queries for each table created.
I had used the follwoing query for one such table:

SET TRUENULLCREATE = off#

CREATE TABLE TEMPTABLE USING 'TEMPTABLE.BTR' (
"FIELD_1" DECIMAL(6,0),
"FIELD_2" CHAR(25),
"FIELD_3" SMALLINT,
"FIELD_4" DATE,
"FIELD_5" DATE,
"FIELD_6" SMALLINT,
"FIELD_7" SMALLINT,
"FIELD_8" CHAR(3),
"FIELD_9" CHAR(1),
"FIELD_10" CHAR(3),
"FIELD_11" CHAR(255),
"FIELD_12" CHAR(6),
"FIELD_13" DATE,
"FIELD_14" DATE,
"FIELD_15" DECIMAL(7,2),
"FIELD_16" SMALLINT,
"FIELD_17" CHAR(1),
"FIELD_18" CHAR(1))#
CREATE UNIQUE INDEX index_1 ON TEMPTABLE(FIELD_1)#
CREATE UNIQUE INDEX index_2 ON TEMPTABLE(FIELD_2 , FIELD_3, FIELD_4, FIELD_1)#

SET TRUENULLCREATE = on#

I used the 'TRUENULLCREATE' keyword as there seemed to be a byte shift that seemed to happen.

After the successful execution of the 'CREATE TABLE' statment, when I ran the 'SELECT' query in grid form I got the message *Invalid date, time or timestamp value.*.
I had checked the knowledge base and this is what i could find:
http://support.pervasive.com/eSuppor...&isExternal=0.

I also tried creating a couple of other tables (that contained 'NO' date fields) from the respective Btrieve files with the 'SET TRUENULLCREATE' statement but there still seemed to be a byte shift. What could be the problem here?

Thanks for the help thats on its way....

Cheers,
Sham