Microsoft KB Archive/156925

= PRB: NULL and .NULL. Are Not Interchangeable in Properties =

Article ID: 156925

Article Last Modified on 10/15/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q156925



SYMPTOMS
In Visual FoxPro 5.0, when assigning a null value to a property in the Properties window, you need to use .NULL. instead of NULL. The values are not interchangeable when used in a property in the Properties window.



CAUSE
In the Properties window, you do not have to enter quotes to enter a string. The text NULL entered without the quotes is interpreted as the string 'NULL' instead of the actual .NULL. value.



WORKAROUND
You need to enter the string as .NULL. in the Properties window.



STATUS
This behavior is by design.



MORE INFORMATION
At times, you may wonder why you can enter the following in the Command window and get the expected result: X=NULL ?ISNULL(X)  <-- .T. is return However, ISNULL evaluates as .F. instead of .T. when a NULL value, without the period on both ends, is assigned to a property in the Properties window.

Steps to Reproduce Behavior
 Create a new form. Create a new property named NullProperty. In the Properties window, assign NULL to NullProperty property (that is, without periods before and after NULL).  Put the following in the form Init: ?ISNULL(THIS.NullProperty)  Run the form.</li></ol>

Visual FoxPro returns .F.

Additional query words: kbdse VFoxWin

Keywords: KB156925

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.