>>>I have been trying to upgrade my VFP3 app to VFP5. There is a problem with three-table SQL query, which works fine and fast with VFP3, but VFP5 starts building an endless .TMP file (until hard disk is full.)
>>>
>>>Anyone seen the same? Any workarounds?
>>>Thanks
>>
>>Please post the SQL statement. I'd be happy to give it a whirl, as, I'm sure, would others.
>>
>
>This is my test program:
>
>Close data all
>Open data data\Y1997
>Open data Data\VfpRefs
>
>
>Select Price,ProdName,AdvName;
> from Y1997!Y1997,VFPREFS!PRODUCTS,VfpRefs!Advertisers;
> Where Y1997.Product=Products.Product and Products.Adv = Advertisers.Adv and Products.Pg=1501;
> Into cursor Temp3
>
>- It works with my full VFP5 intallation, but not with a runtime installation.
You could try either 'grouping' your where statement, ie.
....Where (Y1997.product = Products.product) AND .....
or, you could break it into two SQL's...the first to get products.adv on pg 1501 and then the resulting file against Y1997. This might give you an idea about where it's going haywire.
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place