Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

Small issue in UPDATE_INDEX in OI dealing with relational indexes (OpenInsight Specific)

At 19 OCT 2001 04:44:30PM [url=http://www.sprezzatura.com" onMouseOver=window.status=Click here to visit our web site?';return(true)]The Sprezzatura Group[/url] wrote:

Sprezzatura has come upon a slight issue in dealing with the UPDATE_INDEX routine and relational indexes. We've informed RTI, the internal fix is simple and should be in the next release.

If you have a btree index on the source of a relational index, calling UPDATE_INDEX will only update the BTree, it will not update the relational index.

For example, suppose we have the following:

COMPANY_CODE in the PROJECTS file is the source for the PROJECTS field in the COMPANY file. (This means as we add a company code to a project, the company record will be updated with this project key).

We also place a BTree on COMPANY_CODE in PROJECTS. Calling UPDATE_INDEX will not have any effect on the relational index.

To update the relational, you must use the reference as stored in the *INDEXES record of the !PROJECTS file, which in this case is COMPANY*PROJECTS*BOT.

This translates to DestFileName*SourceFieldName*SortOrder.

This is not an issue if a cross reference index is in place, just a btree.

This is also not an issue of you have UPDATE_INDEX update all indexes in a file.

It is an issue when passing in the field name or using the Update/Rebuild option in the Database Manager, which does an UPDATE_INDEX(file, field) according to the OE log file.

We hope this helps some people with some relational index oddities that have shown up in the past.

The Sprezzatura Group

World Leaders in all things RevSoft

View this thread on the forum...