P
Peter Judge
Guest
INDEX-INFORMATION() on the temp-table handle? From the help: " Returns index information in a comma-separated list for the ith index in the buffer’s table. The returned comma-separated list consists of the following in the specified order: The index name Three integer values of value 0 (FALSE) or 1 (TRUE) depending on whether the index is unique, primary or a word index The names of the index fields, each followed by a 0 (ascending) or 1 (descending) " Simple code example: phIn is a buffer handle. method protected void WriteIndexInfo(phIn as handle): define variable iLoop as integer no-undo. define variable iMax as integer no-undo. define variable cIndex as character extent no-undo. assign iMax = 1 cIndex[iMax] = phIn:index-information(iMax) . do while cIndex[iMax] ne ?: assign iMax = iMax + 1 cIndex[iMax] = phIn:index-information(iMax). end. end method. hth, -- peter From: twc [mailto:bounce-twc@community.progress.com] Sent: Monday, 03 November, 2014 13:10 To: TU.OE.Development@community.progress.com Subject: [Technical Users - OE Development] Dynamically access TEMP-TABLE index data Dynamically access TEMP-TABLE index data Thread created by twc Progress 10.1C and 10.2B How does one dynamically access index keys of a TEMP-TABLE? Use Case: Dataset created with no direct DB table relation (i.e. no "like" DB table to access _file, _field, _index to process) Utility processing implemented dynamically - pass any dataset handle with any structure, all character fields are processed and SOME CAN BE changed using tracking-changes and BEFORE-TABLES Utility provides reporting support - any dataset handle received will have changes reported based upon BEFORE-TABLES report data changed by: find unique index with fewest components (fields) - if no unique key, use primary index ( how to do this??? ) print index field name/values (i.e. allow user to uniquely identify source data) for fields changed, display field name and before/after values Can't find anything about dynamic TEMP-TABLE index access with the one exception - "
rimary" displays the name (character value) of the primary index. The name doesn't help determine which fields are components of the primary index. What about other indexes? Seems like this has to be available and I am just missing it. Thanks, Tim Stop receiving emails on this subject. Flag this post as spam/abuse.
Continue reading...
Continue reading...