The mystery of the century... RRS feed

  • General discussion

  • Ok Wizards lets see you figure this one out...

    How can this code result in finding the record and opening browse window, showing the "RACWF2" item, but return an empty cursor when the select command is issued...

    I can only think of some corruption in data or some other weird thing.


    cRugno = "RACWF2"
    SELECT ruginv
    SET ORDER TO rugno
    SEEK cRugno
    brow   && opens browse with RACWF2 item found and seeked to.
    SELECT * FROM ruginv WHERE rugno = cRugno     && Returns empty cursor

    Thursday, November 29, 2018 8:21 PM

All replies

  • OK... got my answer:

    table ruginv had legacy index files (IDX) as well as cdx file.

    A different part of the program was updating the table without the IDX files being updated.

    So in effect, the code in the original post had somewhere:

    use ruginv index ruginv1.idx

    which ruginv1.idx wasn't properly updated and had missing records.

    The problem got resolved by reindexing all idx files associated with ruginv.dbf

    40 years experience programming and I still get baffled by stuff like that.

    Thursday, November 29, 2018 11:21 PM