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!

Modifying ddfs

Status
Not open for further replies.

dgillz

Instructor
Mar 2, 2001
10,043
US
I have several.btr files that are not included in the ddfs supplied by the vendor. I know the table structure of these files. How do I modify the ddfs to look at these files?

I added a new table in Pervasive 9 control center, but it created a NEW file with a .mkd extension rather than looking atthe existing .btr file.

Any insights appreciated.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"A fine is a tax for doing wrong. A tax is a fine for doing well.
" - unknown
 
If you are using a CREATE TABLE statement, you can add the "USING" and the "IN DICTIONARY" clauses to specify existing files. The USING clause allows you to specify the actual filename. For example, CREATE TABLE table USING 'file.btr' (F1 char(10)).
The IN DICTIONARY clause tells the engine to only modify the DDFs and won't modify the data file.

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
 
Can you supply an example of this that I can mimic?

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"A fine is a tax for doing wrong. A tax is a fine for doing well.
" - unknown
 
Sure. Here's an example of a Create that uses both options I describe:
CREATE TABLE test IN DICTIONARY USING 'test.btr'
(f1 char(10),
f2 char(20),
f3 char(30))

The IN DICTIONARY can also be applied to the CREATE INDEX statement:

CREATE INDEX idxF1 IN DICTIONARY ON test (f1)


The CREATE TABLE will create an entry in the DDFs pointing to "test.btr" but won't overwrite "test.btr".
The CREATE INDEX will create an index entry in the DDF but won't modify the underlying data file.

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top