Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

one quick question... 1

Status
Not open for further replies.

boolean

Programmer
Mar 5, 2002
35
US
Hi,

Firstly, am no Pervasive guru.. i have infact been working on it only for the past couple of weeks....

We recently switched from Pervasive v7.0 to Pervasive 2000i.
and I had found that the existing tables seemed to fail the Consistency tests run on our db. I realized that I had to recreate the DDFs for my existing Btrieve files and had tried using the BtSearch32 utility...
I was looking for more options of recreating the DDFs when I bumped into a feature in the PCC...

I had created a new database with the fresh DDFs and being a Microsoft guy ;) I tried to drag a table from the existing database and drop it into my new db.
I was astounded by the results. The PCC showed the message that the table was being copied from the existing database to the new database I had just created.
Following the tables creation in my new database (by the drag and drop method ofcourse!!), I had run the consistency tests and the table seemed to PASS THE CONSISTENCY TEST!
The table had earlier failed the test in my existing table.

I had checked up the FILE.ddf, FIELD.ddf and INDEX.ddf and they seemed to have been updated correctly.
Now the only *catch* is that the data file of the new table created (remember? by the drag and drop method ofcourse!!) is in the 'mkd' format.
Earlier the table was in its 'btr' format.

My question is this:
"What is the difference between the 'Microkernel (mkd)' file and the 'Btrieve (btr)' file and how would this affect my database? Also is there any way by which I can convert the 'mkd' files to the 'btr' equivalent??"

Thanks for the help thats on its way...
Sham
 
A Btrieve file can have any extension - or even no extension. There is no distinction by Btrieve between *.mkd, *.btr, *.dat, *.bt, etc. Customers can choose any name & extension.

The only requirement is that Btrieve files are uniquely named regardless of their extension. In other words, you can't have two files with the same name but different extensions. Btrieve will not distinguish between Person.dta and Person.mkd.

So, no conversion is required. If you have a database with a table definition referencing a .mkd file, but your physical Btrieve file actually has a .btr extension, you have two choices. You can rename your Btrieve file to .mkd (which could have drastic affects on other applications), or you can edit the table definition in the DDFs to specify the file as .btr.

There are two ways to change the file name in the DDFs. But, before you do anything, make a backup of your DDFs.

If you are on Pervasive.SQL 2000i SP3 or later, you can use the following SQL statement in a SQL Data Manager window:
ALTER TABLE person IN DICTIONARY USING 'person.btr'

If you don't like executing SQL, you can use PCC to do this as well. Go into PCC and open up your database. Right click on the table you want to change, and select Tasks/Edit Table Design. Before you change anything - go to Tools/Options and make sure the "Table Link Mode" box is NOT checked. This way, any changes you make will only be made in the DDFs and your data file will not be touched.

Then, go to the Statistics tab and edit the Table Location field. Make sure you hit enter after editing, and then Save the change.

Hope this helps!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top