Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2004
    Posts
    2

    Question Unanswered: Corel 8 Repair Advice

    I normally work with Delphi, and while I do use Paradox tables, I've never used Paradox itself. I got called to fix a Paradox 8 app that someone built before leaving their employer. The users at this place continued to use the software without good backups. They have had a bunch of problems which they have tried to fix themsleves. It seems that they have some tables now with missing indexes. If I can find out what the missing indexes are, then I can add them. What I don't know how to do is how to figure out what indexes the Paradox application (forms) are expecting. Does a Paradox app store a datamodel of some sort, or will I have to try to read through all of the code, form properties etc. to try figure out what index is missing?

    Any advice would be appreciated.

    Thanks,
    Chris

  2. #2
    Join Date
    Oct 2003
    Posts
    107
    Indexes are defined at the table level, so you could view them using Restructure. Primary indexs are keyed fields and have a notation to the left of the field indicating if it is part of the key. Keyed fields must always appear as the top level field(s) in the table.

    Secondary Indexes are also defined at the table level and you can also see them under Restructure. They are defined by names given by the table's creator. The keyed fields in a secondary index are not marked in any way on the main restructure tab, but you can select the name of the secondary index to see their structure.

    In the form code, you probably need to look for a switchIndex call to determine if any secondary indexes are used when the forms are active (or a some object is clicked). On the code editor there is a search function, but you would need to check the Global Search box on the search dialog to make sure you didn't miss anything.

    If the secondary indexes are gone, you will need to reconstruct them if you can intuit what they are supposed to be from the code attached to whatever object calls them.

    CAVEAT: Indexes can be built with code, but in most cases it's less trouble to do it under the restructure dialog.

  3. #3
    Join Date
    Mar 2004
    Posts
    2
    I think they've deleted one (or more) of the index files, as they're getting a message about missing indexes. There's no documentation, and I was hoping that Paradox 8 would keep a record of the tables' schemas, since indexes, PK's etc. only show up if the corresponding files are there. This site has a mess of files in the directory where their tables are, and the don't have good backups.

    While I am familiar with working with/restructuring Paradox tables, I don't know enough about Paradox itself to quickly deduce the tables' schemas from ObjectPAL code. I've already asked a 3rd party to have a look at the code, but thanks for your info.

  4. #4
    Join Date
    Oct 2003
    Posts
    107
    Okay - but if it is the main index, you could probably look at the structure (field names) of the tables in the relational set and deduce what the index should have been. Then cross your fingers and hope the original programmer did it right.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •