Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Image control doesn't show selected image
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Image control doesn't show selected image
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Database:
MS SQL Server
Miscellaneous
Thread ID:
01642403
Message ID:
01642403
Views:
42
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?
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform