>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")
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