Michael, My only advice is NO NO NO. Certainly in VFP9 the recno() function has absolutely no meaning and can in fact assume mythical values which must be drawn from the temporary background temporary cursors used in the VFP Engine I guess because when analysing within the SQL statement you are never actually pointing to a record per se ...just a data container which has been retrieved by VFP from "Somewhere".
The recno() function especially goes haywire if VFP uses Rushmore and can give really misleading results. Don’t make the mistake of thinking that adding an alias in the Recno() works either. If anything it is worse. The real bummer is that it will always seem to work correctly on small datasets but throws the errors invariably on large live data datasets. Dave Crozier -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of MB Software Solutions General Account Sent: 20 March 2008 20:03 To: ProFox Email List 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.

