Ravi,
>
>>Do you understand *why* the group clause is invalid?
>No. It ran in VFP6 and VFP7. So to me the "why" points to VFP8. Have used this code for a long time. Here is the one that gave the error:
>
>
SELECT Appointments.app_time, Appointments.app_date,;
> Appointments.pat_last;
> FROM appointments;
> where appointments.app_date >= mquerydate .AND.;
> appointments.app_date <= mquerydate + 8;
> GROUP BY Appointments.app_time, Appointments.app_date;
> ORDER BY Appointments.app_time, Appointments.app_date;
> INTO CURSOR existingappoints nofilter
>
This has been discussed a lot recently; in case you missed them, below are some threads. In prior versions, you were allowed to select fields that were not in the group clause (or in an aggragate, such as SUM()).
In your example, you can't control which pat_last you get. For example, if you have three records with the same app_time, and if they have three different values for pat_last, VFP would (I believe) give you the pat_last for the first record it came accross.
The problem is, you really couldn't be sure you were getting the data you wanted for those fields. That's why they changed the behavior.
So I would SET ENGINE and set it back after the statement, only if you are convinced the code really works.
Re: Group by problem Thread #
771194 Message #
771302Group by clause in vfp8 Thread #
774269 Message #
774269Re: Data grouping with the reference of last transaction Thread #
771821 Message #
771832>I am also concerned abou the second message "Data type is invalid for this property" and this message appears when I issue the Modify form MyForm command in the command window. Never used to happen with VFP 6 or 7.
I dunno about this one...
Steve Gibson