Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Empty()
Message
From
07/10/2004 16:36:14
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00949698
Message ID:
00949712
Views:
11
Sergey,

Sorry,Ask the wrong question but to check if
"field3 integrity failed " when field2 is EMPTY and field3 is still fill WITH some characters

You can use EMPTY() function.

How to check if field1 is never empty, field2 is empty sometimes that field3 must be empty too ?

mytable.dbf

field1 field2 field3

aaaaaa bbbbbb cccccc
dddddd
eeeeee ffffff ggggggg

a second row with dddddd in field1 should have field2 and field3 empty.

if field3 is not empty

dddddd BLANK kkkkkk(field3)

this row should provide some error message ?
use mytable 

SCAN
*    - "Level 3 integrity failed [class code]" when level 2 is EMPTY and level 3 is fill WITH 123
   
   IF EMPTY(level2) and EMPTY(LEVEL3)

   ANS = MESSAGEBOX(''+CLASSCODE+''+LEVEL1+LEVEL2+LEVEL3, 0, 'LEVEL2 EMPTY BUT LEVEL3 FILL')      
 
   ENDIF
*!*	LOCAL lcAns

*!*	    lcAns= IIF(EMPTY(level2),EMPTY(level3),.T.)
*!*	    
*!*	    ?lcAns
     

ENDSCAN


TIA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform