Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remote views and null memo (text) fields
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00408342
Message ID:
00408399
Vues:
24
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform