Data Access Worldwide Knowledge Base

Article ID 2260
Article Title INFO: Is RowId a permanent record identifier?
Article URL http://www.dataaccess.com/kbasepublic/KBPrint.asp?ArticleID=2260
KBase Category VDF (GENERAL)
Date Created 11/14/2006
Last Edit Date 03/05/2010


Article Text
Question:
Can RowId be used as a permanent record identifier?

Answer:
Short answer: No.

Long answer:
Developers should make absolutely no assumption about a RowId value other than that it is constant during the length of your program session.

The RowID specification does not specify or mandate that RowID is permanent or not permanent, only that it's uniquely identifying a specific record for some reasonable amount of time.

Furthermore, the persistence of RowID, its construction and what it's based on, is a driver implementation detail. Each driver is free to implement RowID any way it sees fit as long as it conforms to the simple rule above. The exact answer for a particular database driver and version may vary. Most DAW drivers, at the moment, may for example use the primary index to derive RowID. This may or may not be true in the future versions of the DAW drivers, and it may or may not be true for all DAW drivers. It may or may not be true with 3rd party drivers, and it may or may not be true in future versions of 3rd party drivers.


So what should a developer do then? If you want to be reasonably database indepent, it's best to not make any kind of assumptions on RowIDs, how they are derived and how persistent they are. The implementation, and exact behavior of RowID, other than stated above, is a driver implementation detail and may change at any time.




This article is recommended reading for the following keywords and/or categories:
RowId


Email this Article
Email this Article to a Colleague
Send Feedback on this Article to Data Access Worldwide
Copyright ©2010 Data Access Corporation. All rights reserved.

The information provided in the Data Access Technical Knowledge Base is provided "as is" without warranty of any kind. Data Access Corporation disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Data Access Corporation or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Data Access Corporation or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.