Chris,
Most likely this is due to the 0 in the enrollID field for null values. BTW, you could use NVL() for this instead of an IIF(). IAC, if the value is null, the structure of the result set is N(1). If there is a value, the defintion is the numeric length of the enrollID field, not N(1).
You may have to expand out the 0 to something like 0000 to get the necessary precision so the result set's structure doesn't change.
HTH.
>I'm fairly sure this one has come up before, but I can't find it.
>
>When attempting to requery a view, I get Error 1494 - View definition has changed.
>
>
>SELECT Leads.leadid, Leads.leadname, Leads.phone, Leads.admissrepid,;
> Leads.resolution,;
> IIF(ISNULL(Enroll.enrollid),0,Enroll.enrollid) AS enrollid,;
> IIF(ISNULL(Lookuplist.entry),SPACE(20),Lookuplist.entry) AS entry;
> FROM ;
> smagic!leads ;
> LEFT OUTER JOIN smagic!enroll ;
> ON Leads.leadid = Enroll.leadid ;
> LEFT OUTER JOIN smagic!lookuplist ;
> ON Leads.resolution = Lookuplist.lookupid;
> WHERE UPPER(Leads.leadname) = UPPER(?vp_leadname);
> AND Leads.phone = ( ?vp_phone )
>
>
>Both parameters are character; when both are blank or only vp_phone has a value, the view requeries properly. When a value is given to vp_leadname, the view throws the error, even immediately after a successful (both blank) requery.
>
>Nothing in the code is changing the view. I have deleted and recreated the view, packed and compiled the database, and the error persists. I'm using VFP 8 and Mere Mortals 7.1.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao