Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ghost file links
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00127796
Message ID:
00128050
Views:
29
>Thanks Jim. I do have a question though. I have identical SELECT statements running prior to this one and after this one, without a NOFILTER designator; the only difference being that they select from different tables and they run absolutely OK. That is, RECCOUNT('cCursor') and _TALLY return the same number of records. These tables are also indexed. If the case is that VFP decides to optimize one statement and ignore the others, the same behaviour happens when running the SQL from the command prompt. It would interest you to know that if the table is copied to another with a different name, this problem does not occur. The table's name is 'bookbase'. I know its not a VFP reserved word. A reply would be very helpful.
>
Sanjay,

The one thing that you can absolutely depend on about how SELECT will produce the result set is that you CANNOT depend on anything about how SELECT will produce the result set. The query optimizer in Visual Foxpro may run the same SELECT two different times and use different methods for getting the results. The optimizer is very smart about the environment it is running in, and uses the most efficient method of producing the result. To get the number of records in the result set ALWAYS use _TALLY and NEVER use RECCOUNT(). RECCOUNT() is not dependable with SQL SELECT results, as you have seen.

If you need the SELECT to produce a new cursor that is not a filtered copy of the original table, then use the NOFILTER option of the SELECT command.

PS. Sorry about the other message, it didn't seem like you had seen my messages.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform