Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to display a BLOB field with image control?
Message
De
14/06/2005 06:33:24
 
 
À
14/06/2005 06:07:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01023015
Message ID:
01023030
Vues:
16
This message has been marked as a message which has helped to the initial question of the thread.
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform