Parent-child link broken in native datafile?
bsmith1 at maine.rr.com
Thu Dec 15 11:42:32 EST 2011
Thank you and thanks to all other responders to my question!
Please note that I am relying on the RSN link only because I set it up many years ago.
I HAVE recently written a parent field to the child file, but some old code relies on the RSN link.
Gary,I think you hit the nail on the head.
I did a quick check on the items file and it says that "The record structure for FITEMS is damaged."
I do remember running the repair and it appeared to work but users complained immediately that there were missing items.
Are you suggesting that I have to export the items in a way to avoid the corruption, and then reimport and recreate the RSN link?
I don't follow your advice on exporting with a sort though.
When I choose Export from the Tools menu, I see an option to select using search by nothing about a sort.
Perhaps you are talking about exporting the data via a method.
If so, could you be a bit more explicit?
The items file happens to be a file with just character and boolean fields.
Many years ago I remember exporting as tab delimited data and then manually removing corruption with a text editor.
I doubt that will work with over 5 million records however.
This sounds like a corrupted index chain in the data file. In this case, the index chain is broken (has a bad record) at some point in the chain. In order to retrieve ALL (or all-1) records you must do an export on some indexed field, with the "use sort" button checked. If you do one sort (ascending) you will get the from the start of the index chain to the break. If you then do a sort (descending) you will get the "other end" of the records back to the break. Trying exports using different index fields will sometime lead to a healthy index chain that give you all the records in one go. This provides a way to get as many records as possible from each file.
I assume from your previous posts that you know you will need to recreate the RSN (hidden) links by running through the child (items) file, do a single file find on the parent (orders) file, and then do a prepare for update, updates files on each item record to restore the Omnis connections (hidden links) for every child (items) record.
If you are exporting based on a default index (usually RSN) that is corrupt you will only get a subset of the records, depending on where the corruption is in the index chain.
Hope this helps,
Dr. Gary Connor, PhD, CIO
DirectLine Technologies, Inc.
1600 N. Carpenter Road
Modesto, CA 95351
Do you hold the key to the parent on the child records? If so you
could write a routine that reads the child - find the parent and
updates the record.
Have you checked for any damage to the database? the worst
offender I find is write behind cashing on a local machine this can
upset the sequence numbering.
Wizard Computer Services
_www.wizardcompserv.co.uk_ (http://www.wizardcompserv.co.uk/) Tel:
In a message dated 12/12/2011 18:50:23 GMT Standard Time,
bsmith1 at maine.rr.com writes:
I've been struggling with a problem in a large datafile and
realize I need help.
I have a system of orders with order items and the database has
been in place for years.
I have about 5 million order item records and about 400,000 orders.
I started this database many years ago and relied upon the
invisible link between children (the items) and the parent (the
order) That link is now broken.
The symptom is that when I find order items based on data on the
order level (e.g order date or order type) does not always work.
Records that ARE there are simply not found.
I tried to do an export and then import of the data twice. Once I
used the order sequence number in the item data.
Another time I used a unique code in the order data in the item
Both times the import worked.
I did random tests and all SEEMED OK.
However, I quickly heard that all was NOT OK.
I'm wondering if not all records were exported correctly since the
invisible order to item link is broken.
Does anyone have any pearls of wisdom on fixing this?
More information about the omnisdev-en