About 1.5 years ago I was dragged kicking & screaming from my DOS world
in one department into the VFP8 world in another department. My boss & I
recently had a "philosophical difference of opinion" on how to search a view
driven grid for specific records.
He always uses a paramaterized view, and prompts the user for input. He
even showed me documentation in KiloFox and/or MegaFox that said that's the
only way to go.
I recently developed an app that creates a couple of indexes on the view
while the screen is loading. I then use a SEEK() command based on the user
input. Additionally, the user can set one or two filters if need be.
Everything seems to work OK and quite fast.

My question is, does VFP8 handle view driven grids better than the
earlier versions? KiloFox & MegaFox were written for the earlier vfp
versions, weren't they?

Re: VFP8 Views with grids in general - Paramaterized or SEEK() - Filtering Same by Ook

Ook
Thu Mar 17 14:30:03 CST 2005

I always take with a grain of salt anyone that says that this or that is the
only way to go. That usually means "my ego is so big that if you don't do it
my way there is something wrong with you". My pholosophy is 1) if it works,
then do it and 2) Ignore those that say this or that is the only way to go.
We are here to meet the user's requirements, and sometimes that means doing
things other then "the only way to go". Caveat: Don't create a maintenance
nightmare by being too unorthodox. Being clever isn't always good if the
poor slob that comes along behind you can't figure out what you did, or has
to spend hours and hours fixing your kluge.

I've done a bit of work with VFP8 grids, and I have not noticed any
significant improvements. VFP grids are still as flaky as ever, but VFP8
didn't make it any worse either. If it worked in previous versions, I would
expect it to work at least as good in VFP8, but don't expect it to work any
better.

"Larry Alexander" <LAlexander@nospam.com> wrote in message
news:urZpUpyKFHA.1280@TK2MSFTNGP09.phx.gbl...
> About 1.5 years ago I was dragged kicking & screaming from my DOS
world
> in one department into the VFP8 world in another department. My boss & I
> recently had a "philosophical difference of opinion" on how to search a
view
> driven grid for specific records.
> He always uses a paramaterized view, and prompts the user for input.
He
> even showed me documentation in KiloFox and/or MegaFox that said that's
the
> only way to go.
> I recently developed an app that creates a couple of indexes on the
view
> while the screen is loading. I then use a SEEK() command based on the
user
> input. Additionally, the user can set one or two filters if need be.
> Everything seems to work OK and quite fast.
>
> My question is, does VFP8 handle view driven grids better than the
> earlier versions? KiloFox & MegaFox were written for the earlier vfp
> versions, weren't they?
>
>



Re: VFP8 Views with grids in general - Paramaterized or SEEK() - Filtering Same by Dennis

Dennis
Thu Mar 17 14:43:54 CST 2005

Larry,

I think your boss is right. I reluctantly started using parameterized views
for grids about two years ago and have never regretted the choice.
Essentially what I do is put the view in the form's data environment and set
the cursor's no data on load property as needed. If I want the user to
provide input before getting the data, I set it to true and issue a requery
once the user provides the input.

By the way, you can still set indexes on the view if you want to give users
a method to sort the result set.

Finally, I am still using version 6 but FoxPro is up to version 9 and I
still see most of the experts that provide input to these news groups
recommending parameterized views.

HTH

Dennis Longfellow

"Larry Alexander" <LAlexander@nospam.com> wrote in message
news:urZpUpyKFHA.1280@TK2MSFTNGP09.phx.gbl...
> About 1.5 years ago I was dragged kicking & screaming from my DOS
world
> in one department into the VFP8 world in another department. My boss & I
> recently had a "philosophical difference of opinion" on how to search a
view
> driven grid for specific records.
> He always uses a paramaterized view, and prompts the user for input.
He
> even showed me documentation in KiloFox and/or MegaFox that said that's
the
> only way to go.
> I recently developed an app that creates a couple of indexes on the
view
> while the screen is loading. I then use a SEEK() command based on the
user
> input. Additionally, the user can set one or two filters if need be.
> Everything seems to work OK and quite fast.
>
> My question is, does VFP8 handle view driven grids better than the
> earlier versions? KiloFox & MegaFox were written for the earlier vfp
> versions, weren't they?
>
>



Re: VFP8 Views with grids in general - Paramaterized or SEEK() - Filtering Same by Dan

Dan
Fri Mar 18 11:32:56 CST 2005

Sounds to me like an argument over whether you should say "happy" or "glad".
<g>

It's a matter of style.

Personally, I prefer parameterized views and almost always regret it when I
go any other way. Partly because grids and filters don't always play nice
together, and partly because if the client calls and wants to move the back
end to SQL Server, the views make it pretty easy to make the move quickly.

Dan


Larry Alexander wrote:
> About 1.5 years ago I was dragged kicking & screaming from my DOS
> world in one department into the VFP8 world in another department.
> My boss & I recently had a "philosophical difference of opinion" on
> how to search a view driven grid for specific records.
> He always uses a paramaterized view, and prompts the user for
> input. He even showed me documentation in KiloFox and/or MegaFox
> that said that's the only way to go.
> I recently developed an app that creates a couple of indexes on
> the view while the screen is loading. I then use a SEEK() command
> based on the user input. Additionally, the user can set one or two
> filters if need be. Everything seems to work OK and quite fast.
>
> My question is, does VFP8 handle view driven grids better than the
> earlier versions? KiloFox & MegaFox were written for the earlier vfp
> versions, weren't they?



Re: VFP8 Views with grids in general - Paramaterized or SEEK() - Filtering Same by Paul

Paul
Fri Mar 18 12:02:17 CST 2005

Your method should work well enough if 1) The data sets are small, and 2) So
is the number of users.

Once you start getting tens or hundreds of thousands of records or large
numbers of users, you'll have to go to client-server, and that will require
views. And if you don't want major rewrites then, you should build views in
now.

OTOH, if the data is small and will stay small, you can get by with your
approach. In fact, yours will probably be faster. But there are some
advantages to parameterized views too, like not having to filter out or
otherwise deal with data you won't need

My feeling is that your boss should leave it up to you, unless he has a
specific reason in mind, like a forecast upsizing to client-server.
Micromanaging is damaging to all involved, including the company. Just
because "this book said so" without explanation doesn't seem enough reason
to me. Experts do disagree on things, and you might find another book some
day that says something different.

But keep in mind that you ARE moving out of the DOS stone age. It'll take a
while to get used to VFP. Give it some time; you'll like it. Years ago, I
was given the option to build an app in the 2.6 that I knew, or in the
new-fangled VFP3 that I did not know and had trouble figuring out. I went
with the new one, and within a couple months I came to appreciate what a
huge improvement it was. I never worked in 2.6 again, except to upgrade.



"Larry Alexander" <LAlexander@nospam.com> wrote in message
news:urZpUpyKFHA.1280@TK2MSFTNGP09.phx.gbl...
> About 1.5 years ago I was dragged kicking & screaming from my DOS world
> in one department into the VFP8 world in another department. My boss & I
> recently had a "philosophical difference of opinion" on how to search a
> view
> driven grid for specific records.
> He always uses a paramaterized view, and prompts the user for input.
> He
> even showed me documentation in KiloFox and/or MegaFox that said that's
> the
> only way to go.
> I recently developed an app that creates a couple of indexes on the
> view
> while the screen is loading. I then use a SEEK() command based on the
> user
> input. Additionally, the user can set one or two filters if need be.
> Everything seems to work OK and quite fast.
>
> My question is, does VFP8 handle view driven grids better than the
> earlier versions? KiloFox & MegaFox were written for the earlier vfp
> versions, weren't they?
>
>



Re: VFP8 Views with grids in general - Paramaterized or SEEK() - Filtering Same by Dan

Dan
Fri Mar 18 14:25:08 CST 2005

Paul Pedersen wrote:
> But keep in mind that you ARE moving out of the DOS stone age. It'll
> take a while to get used to VFP. Give it some time; you'll like it.
> Years ago, I was given the option to build an app in the 2.6 that I
> knew, or in the new-fangled VFP3 that I did not know and had trouble
> figuring out. I went with the new one, and within a couple months I
> came to appreciate what a huge improvement it was. I never worked in
> 2.6 again, except to upgrade.

Years ago, when VFP3 was still in beta, I was showing it at a user group
meeting. By this point, I'd been almost exclusively using VFP for about six
months. At the end of the meeting, one of the attendees asked a FPW question
so I started it up to show him his answer....

AND WAS FRUSTRATED AS ALL GET OUT!!! <g>

I kept trying to right-click where it wasn't supported, etc.

Whil Hentzen was in the front row giggling at me. LOL

Dan



Re: VFP8 Views with grids in general - Paramaterized or SEEK() - Filtering Same by Paul

Paul
Fri Mar 18 21:32:00 CST 2005

Ha ha!

VFP3 had been out for nearly a year before I started using it. Even after I
figured out classes and how to use them, I couldn't understand why in the
world anyone would want to write code in such a convoluted manner. After I
finished my first app in it, overwhelming advantages became obvious.



"Dan Freeman" <spam@microsoft.com> wrote in message
news:eXKuVi$KFHA.2952@TK2MSFTNGP10.phx.gbl...
> Paul Pedersen wrote:
>> But keep in mind that you ARE moving out of the DOS stone age. It'll
>> take a while to get used to VFP. Give it some time; you'll like it.
>> Years ago, I was given the option to build an app in the 2.6 that I
>> knew, or in the new-fangled VFP3 that I did not know and had trouble
>> figuring out. I went with the new one, and within a couple months I
>> came to appreciate what a huge improvement it was. I never worked in
>> 2.6 again, except to upgrade.
>
> Years ago, when VFP3 was still in beta, I was showing it at a user group
> meeting. By this point, I'd been almost exclusively using VFP for about
> six
> months. At the end of the meeting, one of the attendees asked a FPW
> question
> so I started it up to show him his answer....
>
> AND WAS FRUSTRATED AS ALL GET OUT!!! <g>
>
> I kept trying to right-click where it wasn't supported, etc.
>
> Whil Hentzen was in the front row giggling at me. LOL
>
> Dan
>
>



Re: VFP8 Views with grids in general - Paramaterized or SEEK() - Filtering Same by Larry

Larry
Thu Mar 31 08:53:34 CST 2005

I was rather surprised at the negative comments regarding my boss. He
does let me do my own thing which is why we arrived at the difference in
techniques. What I was looking for was some technical reason why my
approach wasn't good practice, since I wasn't experiencing problems.
Apparently I didn't proceed far enough with my testing. As pointed out
in KiloFox, a filtered grid is the quickest way to bring your application to
its knees. Working with a 105,000 record table, if the result set of the
filter fills up the grid, everything's fine. As soon as the filter resulted
in fewer records than I had rows in the grid, things got veeerrryyy slow. I
guess VFP8 just went through every record in the table in a non-optimized
fashion trying to fill up the grid. Since I was using an indexed field, I
expected that VFP would stop looking once it passed the filter criteria.
Using a COUNT FOR command to determine the number of records found didn't
seem to slow things down, regardless of the returned value.
My boss had a similar problem (in the same table) using a SELECT
statement into a cursor, using the cursor as the record source of the grid
(see "grid stalling" in this newsgroup) which prompted me to try my
technique. He has since solved the problem thanks to the responses to his
posting.
I was able to speed things up somewhat by creating a filtered index.
Since the code is running in the interactive change event, the first pass
only has one character and it took about 3 seconds populate the grid.
Subsequent entries resulted in response times in the 20 millisecond range.
My boss's solution runs consistently at just under a second.
I don't know if this grid characteristic has changed with VFP9. I hope
so. They're a great tool.



"Larry Alexander" <LAlexander@nospam.com> wrote in message
news:urZpUpyKFHA.1280@TK2MSFTNGP09.phx.gbl...
> About 1.5 years ago I was dragged kicking & screaming from my DOS
world
> in one department into the VFP8 world in another department. My boss & I
> recently had a "philosophical difference of opinion" on how to search a
view
> driven grid for specific records.
> He always uses a paramaterized view, and prompts the user for input.
He
> even showed me documentation in KiloFox and/or MegaFox that said that's
the
> only way to go.
> I recently developed an app that creates a couple of indexes on the
view
> while the screen is loading. I then use a SEEK() command based on the
user
> input. Additionally, the user can set one or two filters if need be.
> Everything seems to work OK and quite fast.
>
> My question is, does VFP8 handle view driven grids better than the
> earlier versions? KiloFox & MegaFox were written for the earlier vfp
> versions, weren't they?
>
>



Re: VFP8 Views with grids in general - Paramaterized or SEEK() - Filtering Same by Anders

Anders
Thu Mar 31 10:45:15 CST 2005

As of VFP9 Grids are optimizable, just like the Bowse has always been.
-Anders


"Larry Alexander" <LAlexander@nospam.com> wrote in message
news:ufBavFgNFHA.2880@TK2MSFTNGP10.phx.gbl...
> I was rather surprised at the negative comments regarding my boss. He
> does let me do my own thing which is why we arrived at the difference in
> techniques. What I was looking for was some technical reason why my
> approach wasn't good practice, since I wasn't experiencing problems.
> Apparently I didn't proceed far enough with my testing. As pointed
out
> in KiloFox, a filtered grid is the quickest way to bring your application
to
> its knees. Working with a 105,000 record table, if the result set of the
> filter fills up the grid, everything's fine. As soon as the filter
resulted
> in fewer records than I had rows in the grid, things got veeerrryyy slow.
I
> guess VFP8 just went through every record in the table in a non-optimized
> fashion trying to fill up the grid. Since I was using an indexed field, I
> expected that VFP would stop looking once it passed the filter criteria.
> Using a COUNT FOR command to determine the number of records found didn't
> seem to slow things down, regardless of the returned value.
> My boss had a similar problem (in the same table) using a SELECT
> statement into a cursor, using the cursor as the record source of the grid
> (see "grid stalling" in this newsgroup) which prompted me to try my
> technique. He has since solved the problem thanks to the responses to his
> posting.
> I was able to speed things up somewhat by creating a filtered index.
> Since the code is running in the interactive change event, the first pass
> only has one character and it took about 3 seconds populate the grid.
> Subsequent entries resulted in response times in the 20 millisecond range.
> My boss's solution runs consistently at just under a second.
> I don't know if this grid characteristic has changed with VFP9. I
hope
> so. They're a great tool.
>
>
>
> "Larry Alexander" <LAlexander@nospam.com> wrote in message
> news:urZpUpyKFHA.1280@TK2MSFTNGP09.phx.gbl...
> > About 1.5 years ago I was dragged kicking & screaming from my DOS
> world
> > in one department into the VFP8 world in another department. My boss &
I
> > recently had a "philosophical difference of opinion" on how to search a
> view
> > driven grid for specific records.
> > He always uses a paramaterized view, and prompts the user for input.
> He
> > even showed me documentation in KiloFox and/or MegaFox that said that's
> the
> > only way to go.
> > I recently developed an app that creates a couple of indexes on the
> view
> > while the screen is loading. I then use a SEEK() command based on the
> user
> > input. Additionally, the user can set one or two filters if need be.
> > Everything seems to work OK and quite fast.
> >
> > My question is, does VFP8 handle view driven grids better than the
> > earlier versions? KiloFox & MegaFox were written for the earlier vfp
> > versions, weren't they?
> >
> >
>
>