I have a project that has been running well in vfp 8.0 for the last 4 years. Today I upgraded to vfp 9.0. Everything seems at this point to work fine except for the creation of my cursors. The below is a sample of one of my cursor creations. It takes .09 seconds in vfp 8.0 and the same code takes 35.75 seconds. The table has 775,000 records in it. Any suggestions resolving this time issue would greatly be appreciated.
Code example:
inspmpt = 'HO_309726'
expirationyear = '2009'
SELECT *;
FROM policyhistory;
WHERE (alltrim(policyhistory.policy) = inspmpt and;
ltrim(str(year(policyhistory.expiration)));
= trim(expirationyear)) or;
alltrim(policyhistory.policy) = inspmpt and;
policyhistory.effective <> { / / } and;
ltrim(str(year(policyhistory.effective)));
= trim(expirationyear));
INTO cursor totalhistoryorg;
order by printdate desc
Code example:
inspmpt = 'HO_309726'
expirationyear = '2009'
SELECT *;
FROM policyhistory;
WHERE (alltrim(policyhistory.policy) = inspmpt and;
ltrim(str(year(policyhistory.expiration)));
= trim(expirationyear)) or;
alltrim(policyhistory.policy) = inspmpt and;
policyhistory.effective <> { / / } and;
ltrim(str(year(policyhistory.effective)));
= trim(expirationyear));
INTO cursor totalhistoryorg;
order by printdate desc