I know that Doug Hennig does magic with Stonefield tools by doing simple queries to the data, then combining them internally in VFP. So, don't combine the intermediate VFP cursors with the RV queries. You might want to ping Doug for some advice.
>Hello,
>
>I have made a CONNECTION to an external Pervasive/ ACPPAC data source. This works well.
>
>I have created and then OPENed a DATABASE which contains Remote Views of 3 specific data collection files from the CONNECTION to Pervasive/ACCPAC data sources.
>
>I have the following SQL statements (see below) and executing them is very slow!.
>
>Is there another way to decrease the number of SQL statemens and speed up getting the results?:
>
> SELECT Rv_uxdetail.custcode, Rv_uxdetail.itemnumber;
> FROM rv_UXDETAIL;
> GROUP BY Rv_uxdetail.custcode, Rv_uxdetail.itemnumber;
> INTO CURSOR crs_Items
>
> SELECT Crs_items.custcode, Crs_items.itemnumber, Rv_arcus.priclist;
> FROM crs_Items Crs_items ;
> INNER JOIN rv_ARCUS ;
> ON Rv_arcus.idcust = Crs_items.custcode;
> INTO CURSOR crs_PriceList
>
> SELECT Crs_pricelist.custcode, Crs_pricelist.itemnumber,;
> Rv_icpric.desc, Crs_pricelist.priclist, Rv_icpric.baseprice,Rv_icpric.baseunit;
> FROM crs_PriceList Crs_pricelist ;
> INNER JOIN rv_ICPRIC ;
> ON ALLTRIM(Rv_icpric.itemno) = ALLTRIM(Crs_pricelist.itemnumber);
> INTO CURSOR crs_CurrentPrice
>
>Thanks for any help.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer