C
chrisjr
Guest
Actually, I did a bit more reading and playing around, and I'm hoping Thomas and/or Tom (at least) can chime in here. What I'm finding is that "FOR buffer", when multiple records exist that meet the search criteria, does not behave as "FIND buffer" does. "FOR buffer" actually does return a record, and seems to behave exactly like "FOR FIRST buffer" does; though I don't have enough evidence to really verify that "FOR buffer" always retrieves the FIRST record. But here's the example I tried: define variable r1 as rowid no-undo. define variable r2 as rowid no-undo. for Individual where FirstName = "Chris" no-lock: r1 = rowid(Individual). end. for first Individual where FirstName = "Chris" no-lock: r2 = rowid(Individual). end. display (r1 = r2). There are 3 Individual records, in my database, with FirstName = "Chris". The output of that display statement is: yes I expected this to behave more like "FIND FIRST" and return an error, or maybe nothing, if the result was ambiguous like this. Reading through the documentation of the FOR statement, I'm not uncovering an explicit answer. Is this how you thought it would work? I'm guessing not...If I'm wrong and you did expect this, then why suggest I not use the FIRST keyword. Thoughts?
Continue reading...
Continue reading...