Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Image control doesn't show selected image
Message
From
27/10/2016 15:25:07
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Database:
MS SQL Server
Miscellaneous
Thread ID:
01642403
Message ID:
01642413
Views:
50
This message has been marked as a message which has helped to the initial question of the thread.
>Hi everybody,
>
>I can not reproduce this problem locally.
>
>We use varbinary(max) column in SQL Server to store images.
>
>There is a complex form with many pages and a TreeView (from Bennet Tech) on the left.
>
>The Activate method of the page with the image is the following (relevant code)
>
>
>if rsSeatMaps.SeatMapID = 0	
>		.cmdAdd.enabled = .f.
>		.cmdDelete.Enabled = .f.
>		.cmdSeatCoordinates.Enabled = .f. 
>	endif
>
>	.RunActivate = .f.
>	if not isnull(rsSeatMaps.SeatMap)
>		try
>			.imgMap.pictureval = rsSeatMaps.SeatMap
>		catch to loException
>			=messagebox('There is a problem with the selected picture: ' + loException.message + ;
>				chr(13) + 'Please, re-try with a different picture...',  48, 'Problem with image')
>		endtry
>	endif
>	lnTemplateID = rsSeatMaps.TemplateId
>
>	if m.lnTemplateID > 0 and seek(m.lnTemplateID, 'rsTemplates', 'TemplateID')
>		thisform.TemplateDescription = alltrim(rsTemplates.descrip)
>	endif
>	.refresh()
>
>The user doesn't see an error message, but he sees an empty image (see the attached picture).
>
>Do you know what could be a problem here?

Is the SeatMap column a memo field or general field? According to help for PicutreVal property the column can be a memo field but not a general field (because general fields store additional unrelated binary data).
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform