Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to display a BLOB field with image control?
Message
From
14/06/2005 07:26:05
 
 
To
14/06/2005 06:33:24
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01023015
Message ID:
01023039
Views:
8
Changing the control from Image to OleBound helped a lot. Just set the Controlsource and presto - it works.

Thank you gentlemen!

BR

Peter

>>Hi Fabio,
>>
>>Thank you for taking the trouble.
>>
>>Now I get an 'Operation is invalid for a General field' error.
>>
>>In VFP help on Image.PictureVal it says:
>>
>>You cannot use a general type field for eExpression because general fields store additional unrelated binary data.
>>
>>But in order to update the field to SqlServer it has to be of type general.
>>
>>The LoadPicture() function does not seem to be of any use either.
>>
>>In short: what to I do?
>>
>>
>
>RV load the SQL image field into a VFP general ( VFP8 setting )
>Use MapBinary to force VFP blob mapping:
>
>CURSORSETPROP("MapBinary",.T.,0)
>* or try
>DBSETPROP(viewname, "VIEW", ("MapBinary",.T.)
>
>
>
>>>>Scenario:
>>>>
>>>>1) Sql Server backend
>>>>Field Logo of type Image
>>>>
>>>>
>>>>Update dbo.Businesses set Logo = 'H:\Develop\Graphics\budget_logo.gif' Where BusinessId = 2
>>>>
>>>>(1 row(s) affected)
>>>>
>>>>
>>>>
>>>>
>>>>2) VFP remote view
>>>>Field Logo of type BLOB
>>>>
>>>>--Form Refresh
>>>>
>>>* PictureVal  is a value, no a cExpression
>>>This.Logo.PictureVal = MyView.Logo
>>>>
>>>>
>>>>Nothing much happens, so obviously it's a snafu.
>>>>
>>>>TIA
Peter Pirker


Whosoever shall not fall by the sword or by famine, shall fall by pestilence, so why bother shaving?

(Woody Allen)
Previous
Reply
Map
View

Click here to load this message in the networking platform