Link to home
Start Free TrialLog in
Avatar of AlanArons
AlanArons

asked on

VFP 8 vs. VFP 9 ENGINEBEHAVIOR

I am having a problem where a query produces different results based on whether it's run in VFP 8 or VFP 9. Here is the query :

SELECT DISTINCT gage.gageno, gage.loc, gage.lastused, gage.duedate, gage.outofserv, gage.gagedesc, gage.customer, gagepart.partno
FROM gage LEFT JOIN gagepart ON ALLTRIM(gage.gageno) = ALLTRIM(gagepart.gageno)
WHERE LEFT(gage.gageno,6) == '13-01-' INTO CURSOR fred

The following are settings in both versions :

ANSI = OFF
EXACT = OFF
ENGINEBEHAVIOR = 70

When run in 9, the query includes a record where the GAGEPART table contains a record with a blank gageno field. When run in 8, it does not. I know I could rectify this by replacing the = in the JOIN clause with a ==, but I'm looking for the reason why this happens. Is there some other setting I need to look at ?

Any insight here would be appreciated.
ASKER CERTIFIED SOLUTION
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AlanArons
AlanArons

ASKER

I was afraid that might be the case.   It occurred to me that the result in 8 given the settings should be incorrect.   I was trying to avoid having to go through all of our code and try and find where this might apply.   Looks like we should turn ANSI on in the programs while still running in 8 (I can do it in the base class for the form.)  and see if it affects anything.  Then when we go to 9 it shouldn't have an effect.  

Thanks for your help.