Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
If empty
Message
From
16/04/2009 06:13:07
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01393914
Message ID:
01395081
Views:
73
>>>You need to look at the actual values in these controls, particularly the EditBox. If the EditBox is linked to a Memo field, then I believe that EMPTY() is only true if value is zero-length.
>>>
>>
>>No, it is not a true statement. It might show as 'Memo' but empty() in that code would return true if memo only have white space created with CRLF, TAB and space.
>>
>>Update: BTW he took that part from me and glued with some new code. But he doesn't say what does 'not work' mean, what are the actual datatypes etc.
>>
>>Cetin
>
>Cetin,
>
>I just tested this and a Memo field with spaces, etc., returns a false for EMPTY().
>
>Chris

Chris,
I said "empty in that code would return true if ..." and I was referring to this piece which I supplied to Mohammed in another forum:
empty(alltrim(nvl(.edit3.value, ''),1,CHR(13),CHR(10),CHR(9)))
which he claimed that doesn't work.

i.e:
Create Cursor memoTest (edit3 m Null)
Insert Into memoTest Values ('    ')
Insert Into memoTest Values (Chr(13))
Insert Into memoTest Values (Chr(13)+Chr(10))
Insert Into memoTest Values (Chr(9))
Insert Into memoTest Values ('     '+Chr(13)+Chr(10)+Chr(9)+'     ')
Insert Into memoTest Values (.Null.)

Select edit3, ;
	empty(Alltrim(Nvl(edit3, ''),1,Chr(13),Chr(10),Chr(9))) As Cetin, ;
	empty(edit3) As plainEmpty ;
	FROM memoTest
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform