If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Corel Paradox > Corel 8 Repair Advice

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-23-04, 13:25
cpettingill cpettingill is offline
Registered User
 
Join Date: Mar 2004
Posts: 2
Question 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
Reply With Quote
  #2 (permalink)  
Old 03-23-04, 14:28
lmckelvy lmckelvy is offline
Registered User
 
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.
Reply With Quote
  #3 (permalink)  
Old 03-24-04, 11:30
cpettingill cpettingill is offline
Registered User
 
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.
Reply With Quote
  #4 (permalink)  
Old 03-24-04, 11:42
lmckelvy lmckelvy is offline
Registered User
 
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On