Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remote views and null memo (text) fields
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00408342
Message ID:
00408399
Views:
22
Hi Mike,
>Just wanted to pass this along. We have a remote view on a SQL Server 7 table that returns the ID column and a binary memo field (text field in SQL Server 7) where we store a .JPG. We used the view and issue a COPY MEMO to copy the file to disk and got an error indicating that the field had to be a memo field.
>
>Upon inspection of some of our view, the memo fields display 'Memo' when something is in them, but nothing when they are empty (in VFP they'd say 'memo'). In SQL Server the text field is = NULL. If you as for the LEN() of the field, it doesn't return 0, it returns nothing.
>
>This does work however (for some reason):
>IF LEN(mymemo) > 0
> COPY MEMO mymemo TO myfile.jpg
>ENDIF

The reason this works is because of the following:
LEN(NULL) is NULL
NULL > 0 is .F.
Bill Armbrecht
VFP MCP
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform