Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
.Null.-value instead of number
Message
From
14/12/2020 03:27:57
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
09/12/2020 16:13:17
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01677502
Message ID:
01677557
Views:
49
>>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.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform