Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
NULL behavior change with SET ENGINEBEHAVIOR
Message
From
11/11/2015 16:50:24
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
NULL behavior change with SET ENGINEBEHAVIOR
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01627348
Message ID:
01627348
Views:
79
Hi all,

Just wanted to confirm this as I could not find anything in the help file.

On an old report, SET ENGINEBEHAVOIR was defaulting to 70. A query in the procedure for the report would work fine:
dimension laTotals[2]
STORE 0 TO laTotals

SELECT ;
   COUNT(*) AS NumInvoices, SUM(InvoiceTotal) AS Total ;
   FROM......WHERE....
   INTO ARRAY laTotals
If nothing matched the condition, previously the array would not be "touched" and the results would be inserted into a cursor (along with many others). That is, both elements of the array would remain at the default zero.

I am now upgrading the report writer and am defaulting to SET ENGINEBEHAVIOR 90. Under this setting, the array is now altered even if no records match the condition. In this case, the array contains:
laTotal[1] = 0
laTotal[2] = .NULL.
So the report failed as the receiving cursor was not set to accept nulls.

I could not find anything in the help file about this change with SET ENGINEBEHAVIOR. Just wanted to confirm as I can work around the change but am wondering if there is another "SET" command to easily work around this (with keeping SET ENGINE at 90) or do I have to check all reports that use this old "technique".

Albert
Next
Reply
Map
View

Click here to load this message in the networking platform