I have seen cases where a person would output records from a table to a different table, Zap the Source table and APPEND FROM the table they had just out from. Depending the Sort Order used then, or previously, it was entirely possible to get new RECNO() values assigned to the newly appended records. They were using RECNO() for some purpose, and this unusul process they would do (apparently to reorder records in some kind of pattern without having to use an index) caused all kinds of problems, but only once in a while... I bet Ed has seen this kind of stuff before.
Also, when a table is buffered and you are appending records, the RECNO() value is assigned a decremented NEGATIVE number. Once you commit the changes from the buffered record(s) the "real RECNO()" value is reassigned as a positive value. Would that be causing a problem in your arena? FWIW I never, ever use RECNO() for anything other than getting a current location in a table before moving off that record with the intent to come back to that specific record again (usually for record-by-record comparative analysis type of work). Pretty much any other use just feels like it will end up biting me in the arse. Ciao! Gil > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of MB Software Solutions > General Account > Sent: Thursday, March 20, 2008 4:03 PM > To: [EMAIL PROTECTED] > Subject: Using RECNO in SELECT-SQL statements > > > (finally...a VFP post!) > > We've got a bug SOMEWHERE in this legacy code but it's a very difficult > bug to recreate. iow, it only appears SOMETIMES and has no consistency > whatsoever. This code creates a lot of temp tables locally (instead of > cursors...why can I only guess that perhaps they didn't have cursors way > back when in Fox or its predecessor...???), and often use "..., RECNO() > as recno" as one of the fields. > > Are there any known gotchas in using RECNOs in a VFP SELECT-SQL > statement? We're using VFP9SP1 but this is legacy code from many years > ago, fwiw. > > tia, > --Michael > > > [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

