Go Back   Access World Forums > Apps and Windows > SQL Server

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 05-03-2017, 06:18 AM   #1
Minty
AWF VIP
 
Minty's Avatar
 
Join Date: Jul 2013
Location: UK - Wiltshire
Posts: 6,432
Thanks: 165
Thanked 1,736 Times in 1,706 Posts
Minty is a jewel in the rough Minty is a jewel in the rough Minty is a jewel in the rough
Question Base64 Image retrival / display

I want to display / print a image stored in linked SQL Server database. The image in question is a signature captured from a html web based sign off form.

The server data is a string (varchar(Max)) of the format
Code:
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhAAAAFKCAYAAABM/WaFAAAgAElEQVR4Xu3dCbiV0x7H8b9ZS....
Using Access 2010 I thought I could simply display this in an image control, but apparently not.

Having done some google research , I've looked at stripping the initial data:image/png;base64, and converting the string to hex for display without success. Image manipulation is certainly not a strong point of mine, so am I missing something glaringly obvious in trying to put this on a a report or form? I can upload some samples if anyone think it would help.

__________________
If we have helped please add to our reputation - click the scales symbol on the left, tick 'I approve' and leave a comment.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Minty is offline   Reply With Quote
Old 05-03-2017, 06:51 AM   #2
CJ_London
Super Moderator
 
Join Date: Feb 2013
Location: UK
Posts: 11,326
Thanks: 40
Thanked 3,666 Times in 3,535 Posts
CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light
Re: Base64 Image retrival / display

not my area of expertise either but looks like you need to use tsql and cast/convert to convert back to an image datatype - see this link as an example http://stackoverflow.com/questions/3...mage-data-type

I googled 'sql server convert varchar(max) to image'
__________________
CJ_London
_______________________
A little thanks goes a long way. If you have found this post useful, please tick the thanks button
CJ_London is offline   Reply With Quote
Old 05-04-2017, 08:25 AM   #3
Minty
AWF VIP
 
Minty's Avatar
 
Join Date: Jul 2013
Location: UK - Wiltshire
Posts: 6,432
Thanks: 165
Thanked 1,736 Times in 1,706 Posts
Minty is a jewel in the rough Minty is a jewel in the rough Minty is a jewel in the rough
Re: Base64 Image retrival / display

I've played around with this for about a day now and drawn a blank (literally ). I think it may be an issue with Access not liking the png format.

In SSRS I can display it by stripping the initial text and using and image box with
Code:
=System.Convert.FromBase64String(Fields!Image1.Value)
as the field property.

I'll persevere and report back if I crack it, but looks like I'm going to be refreshing my SSRS skills some time soon...

__________________
If we have helped please add to our reputation - click the scales symbol on the left, tick 'I approve' and leave a comment.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Minty is offline   Reply With Quote
Reply

Tags
decoding , display , image , image control

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unexpected Data Retrival in Form jcbhydro Forms 5 09-13-2014 09:50 AM
I don't know how to display an image OBBurton Queries 3 12-28-2013 12:31 PM
Question Incorporate Sha256 with Base64 rberkers General 1 04-21-2011 10:28 AM
select name in combo box display image in bound image box botit Forms 5 03-07-2011 11:14 AM
about image display borislo Forms 1 02-04-2005 01:01 AM




All times are GMT -8. The time now is 02:26 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World