Link to home
Start Free TrialLog in
Avatar of andrewyu
andrewyu

asked on

MDX

What is MDX file ?

Is it the index file for the Paradox table ? If no, is there similar file for Paradox table ? If yes, how and when will it be created ?

Andrew
ASKER CERTIFIED SOLUTION
Avatar of Matvey
Matvey

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of andrewyu
andrewyu

ASKER

So, is it related to Paradox !

Andrew

I'm afraid not, but maybe some paradox engines create files with the same extention for it's indexes. Anyway, the only info I found about this was related to XBASE and not Paradox. I advice you to see the seccond link (http://www.e-bachmann.dk/docs/xbase.htm).

Regards, Matvey
So, what is the file extension for index file of Paradox table ?
Paradox and DBASE handle indexes differently.  In DBASE you can have several indexes and they are referenced in an mdx.  

In Paradox, you have a key which is your primary index that's kept in a .px file.  Then you can create secondary indexes.  For each secondary index you create, Paradox will generate a .xg? and .yg? file where the ? is a number that apparently indicates the order in which the indexes were created.

For example, if I create a Paradox table named TEST with a primary index and two secondary indexes, I will have the following files:
TEST.DB
TEST.PX
TEST.XG0
TEST.YG0
TEST.XG1
TEST.YG1

Hope this is helpful.
So, you meant that test.XG0 and test.YG0 is the files for the same secondary index ?
That is my understanding, yes.

I created two tables (one in Paradox 7 and one in Paradox 4 for comparison's sake) and kept creating and deleting secondary indexes.  

For every index I created, an XG? and YG? were created.  When I deleted an index, both the xg and yg disappeared.
Thank you very much !

But, when and how do I use the property IndexFiles in TTable ?
A dBASE MDX file can contain several indexes. You specify the IndexFiles property (used only for dBASE) to define the list of available index files, that will be opened and updated later if needed.
After a list of available index files is set, you can specify the IndexName property to set the current index that will determine the sorting and searching for your table.

IndexFiles can be also left blank, I think, if there is just one index file for the table. That file will be used by default and the IndexName combo-box will show indexes available from the file. (table name "MyTable.DBF" - index "MyTable.MDX)
Thank you very much !