Hi,

smu johnson wrote:
With a Roll-your-own index open, when you use a dbgoto(), the record pointer is moved to the correct row in the table but the pointer in the index file is not positioned to the corresponding row, even though the record is in the index. With a regular cdx index, the index pointer is always positioned after a dbgoto().

Perhaps the reason for not positioning the index pointer in an ryo index is that an ryo index can contain multiple entries for a single table row, and as such, positioning the index pointer would be ambiguous action (pick one?) and could therefore cause unpredictable results. Am I correct in that thinking?

DBF can be positioned by record number. Index can be positioned by key value. Since in RYO indices keyvalue could not be calculated using record data, index can not be positioned. You can think that DBGOTO() call also executes DBSEEK(&(ORDKEY())) to position index. In case of RYO, ORDKEY() has no meaning.


Regards,
Mindaugas
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to