Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Blob Field (Q) vs. Memo (binary)
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01537752
Message ID:
01537784
Vues:
41
>Hi Naomi,
>
>Is blob and memo binary the same?
> Yes.
>
>I convert from blob (Q) to memo (binary)?
> Yes. CAST(blob AS memo)
>
>Binary flag for C/V/M only tell VFP - do not convert data at reading or writing from/to field.
>
>MartinaJ
>

One more question - I got the type as Q, but after I copied the field name to another variable and checked it with type(@Variable) it was 'W'. Is it the same?

Also, I have the following code for the memo
 if type("&ImageSource") = "M" and len(&ImageSource)>1
         cOFile = GenOFile(".jpg",.t.)
         copy memo (m.ImageSource) to (m.cOFile)
         cOFile = E0Resize(m.cOFile, dpi)
      endif
      if INLIST(type("&ImageSource"), "Q","W") && blob field
         cOFile = GenOFile(".jpg",.t.)
         strtofile(&ImageSource,m.cOFile)
         cOFile = E0Resize(m.cOFile, dpi)
      endif
The second case I added for Q/W. My question is - may be the copy memo command will work the same for Q/W also or I need to cast it first?

What do you think?

Thanks again.

UPDATE. I tried to use INLIST(..., "M","W","Q") in the first case and it seems to work just fine.

>
>>Hi everybody,
>>
>>I can get SQL Server image field back to VFP as blob type (Q) if I used CursorSetProp('mapbinary',.t.,0). Alternatively, I can create a remote view and get this field as memo (binary). Both work fine, but my question is - are they the same? How can I convert from blob (Q) to memo (binary) if needed?
>>
>>Thanks a lot in advance.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform