General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
I found a source of C00005 errors tied to this thread. If you use a
parametered query (SELECT * FROM TEST WHERE TEST = ?nValue)
And rushmore returns a 'filtered result set', then the filter it uses
is SET FILTER TO TEST = ?nValue (it uses the parameterized query as a filter literally)
But nValue moves out of scope, so when I issue a GO TOP, vfp tries to
reapply the filter, and POW! C0000005
I don't think they need to be eliminated, considering the performance increase,
but the fox team needs to hide it from the user so it acts the same as if NOFILTER was used. (ie record numbers & parameterized queries that don't C5)
>Hi Craig,
>
>These damned 'filtered results sets' (or whatever they are popularly called) are a CURSE. They cause only trouble and give virtually no advantage. It would be wise of MS to ELIMINATE that "feature".
>
>Cheers,
>
>Jim N
>
>>>If you have a large table, and perform a SQL Select, Rushmore might USE AGAIN the table with a filter in effect. The BIG problem with this (which I think is a bug), is that the entire file is still available as are the records of original files. Rushmore should always return the same type of cursor regardless of what it had to do. The bug is also in the GO command, which disregards the rushmore filtered file and actually GO's to the record in the parent file, not the query result!
>>>
>>>For example:
>>>
>>>SELECT * FROM TESTFILE WHERE KEYFIELD = 1 && Keyfield is indexed
>>>* Should return 1 record
>>>GO 1
>>>? KEYFIELD
>>>GO 2
>>>? KEYFIELD && prints record 2 keyfield
>>>GO 3
>>>? KEYFIELD && prints record 3 keyfield
>>>
>>>Same Code with NOFILTER:
>>>SELECT * FROM TESTFILE WHERE KEYFIELD = 1 NOFILTER
>>>GO 1
>>>? KEYFIELD
>>>GO 2 && EOF error
>>>GO 3 && EOF error
>>
>>This is by design, and only happens when you do this type of SELECT (ie. one table, with no calculated fields, etc.). There are ways to get around it. Look at the NOFILTER clause. You can also add a calculated field. Note that when you do a multi-table join, VFP does a USE AGAIN on the tables.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only