do set_setup cursorsetprop("MapBinary", .t., 0) && Maps image/varbinary(max) fields to blob in VFP _vfp.autoyield = .f. * http://www.bennet-tec.com/compatibility.htm#FoxPro set deleted on set notify offThis is a button to upload image:
local lcFile, lcPicVal, lnFSize, loException as exception local array laFile[1,5] lcFile = getfile("jpg;bmp;gif;png",'Select Seat Map Image','Select',0,'Select Image') thisform.lBigImageSize = .f. if not empty(m.lcFile) =adir(laFile, m.lcFile) lnFSize = laFile[1,2] if m.lnFSize > 1024 * 400 lnFSize = int(round(m.lnFSize / 1024, 0)) if messagebox('This image is ' + alltrim(transform(m.lnFSize,'999,999,999')) + 'Kb in size! ' + ; 'Large images will adversely affect performance as well as storage requirements.'+chr(13)+chr(13) + ; 'Do you want to proceed anyway?',36, 'Image size too big') <> 6 return .f. else thisform.lBigImageSize = .t. endif endif try lcPicVal = filetostr(m.lcFile) replace SeatMap with m.lcPicVal in rsSeatMaps this.parent.imgMap.pictureval = rsSeatMaps.SeatMap thisform.lChangesMade = .t. thisform.RefreshButtons() 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 this.parent.refresh()I see no exception message. The SQL Server row shows correct value for the image. Just the image control doesn't display the image.