General information
Category:
Coding, syntax & commands
>>I am trying to use a grid to display my results from a select. My WHERE is complex so I understand that it rules out using parameterized views. Currently, I am changing the grid recordsource to "", removing the cursor previously linked to the grid, selecting the records into to a new cursor (reusing the old cursor name), and then changing my recordsource back to the cursor name. The SELECT is executed very fast but when I attempt to repopulate the grid, the less records selected, the slower my results. ( Ex. 650 records < sec., 200 records > sec., 36 records several sec.s)
>William,
>
>Ok, what is happening to you here is that your SQL is NOT creating a temp table for you, it is filtering the original table. With filters the less records that meet the filter the longer it takes to populate the grid. If you are using VFP 5.0 you can add the NOFILTER clause to your SELECT command, if you are using VFP 3.0 add an other where option like this one;
>
> ... WHERE ... AND .T. = .T. ...
>
>This force VFP to create a temp table for the cursor and will speed up your grid display.
This was the problem. All I can say is THANKS. I have been embarsed by this little problem before having not tested my code well enough. It's amazing how such a seemingly small thing can change your quality of life. My wife thanks you. And thanks to all of you guys who responded.
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