What is 'Record ID' (RID)

<< How do you support multip ...
Back to Portfolio FAQ index
Can I do incremental upda ... >>

Manual: v5 - page 282 (%RID% macro), v6 - PortWeb manual page 28

Each Record has a Record ID number which is unique to that Record. Although Portfolio leads one towards only having one record per Filename, the Filename cannot be relied on as a unique identifier - thus the RID. The RID is a counter, starting at 1 and always rising as each new record is added; the counter does not decrement if a record is deleted in order to maintain the integrity of the data.

In normal use you don't see the RID as it is hidden but it is exposed in a number of ways:

When scripting note that the RID is not a field. In the VB type library the RID is accessed as the RecordID property of the Record class.

Don't be surprised if you script out the RIDs to a field and find either that they don't start at #1 or that there are unexplained gaps in the sequence. This is to be expected and is a by-product of Portfolio's flat-file underpinnings. In basic terms, Portfolio uses some Records for internal purposes, in doing so taking the next free Record (and RID#). Thus if you add 50 new images to some exiting data, whose last RID is 100, and then find the new RIDs run from 101 to 154 with 3 gaps what you are seeing is that Portfolio used 3 records for internal reasons during the archiving.

Don't bother when/why these 'gaps' occur but do understand that a missing RID sequence doesn't necessarily imply missing data. Clearly if you delete data, those RIDs will disappear from the database (and will not be re-issued).

Despite the 'missing' internally-used RIDs, the RIDs for your record are still always unique and so referring to a record by its RID will be unambiguous.

Question: What is 'Record ID' (RID) [FAQ00131.htm]
Last Update:- 31 May 2006

<< How do you support multip ...
Back to Portfolio FAQ index
Can I do incremental upda ... >>

Quick Search of PortfolioFAQ (word, words or phase): or try the Advanced Search

User-to-User Forums  |  Report error/typo/broken link  |  Request new topic  |  Ask a question

Site and articles © Mark Anderson 2001-2007 - Visit my home page

This FAQ is created and maintained using
Friday logo
Friday - The Automatic FAQ Maker