>>Hi there,
>>
>>in VFP8 I could do the following qzery:
>>
>>SELECT sum(betrag) FROM faktur WHERE kundennr = 9999999 INTO Cursor mycursor WHERE kundennr = 9999999
>>
>>and get a Cursor with a numeric field (or an array[1]-value) containg the value 0 when the query did not get any records.
>>
>>In VFP9 I get the field of my result-cursor filled with .NULL.
Yup, the behavior changed in VFP9 in exactly that manner. It was one of the 5-6 things for which I had to scour the whole app when we switched from 8 to 9. If you have an aggregate function and it finds no records, you still get one record in the result and it contains a null in the result field.
So either stay compatible with VFP8 or adjust the code to reflect this.