Kbase P24398: How safe is it to use ROWID to RECID data type conversion to
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  6/27/2003 |
|
Status: Unverified
GOAL:
Is it safe to use ROWID to RECID data type conversion to access table records?
FIX:
There is no native 4GL function that converts ROWID variables to RECID variables or visa versa.
A ROWID is a unique internal identifier of the current database record. A ROWID variable may be converted to a character string representation using the STRING function. A ROWID value converts to a hexadecimal string of the form "0xhexdigits," where 'hexdigits' is any number of characters "0" through "9" and "A" through "F".
A RECID is a unique internal identifier of the current database record, which is supported mainly for backward compatibility. For most applications, Progress recommends the use of ROWID instead. A RECID variable has a default INTEGER type representation. Progress 4GL TO-ROWID Function converts a string representation of a valid ROWID variable to a valid ROWID value.
Although TO-ROWID converts a properly formatted string to a ROWID value, there is no guarantee that this value corresponds to an existing record in the database.
One must exercise extreme caution when trying to convert a RECID variable to a ROWID variable as the ROWID variable may not ALWAYS be a unique identifier of the current database record.
Progress strongly recommends against the use of either ROWID or RECID values conversions or as database table fields as these values would be changed during a database dump and load.