rhenry62
Posts: 1
|
Posted: 10/24/2016, 5:13 PM |
|
Hi,
Can anyone point me in the right direction?
I've have created a page that I added a Grid to using the Grid Builder to display data from SQL.
One of the fields is an SQL.Image field that is holding what I believe to be a .jpeg image.
I can see the data (random char's), but I'm not sure how to show the image?
Any help would be SUPER appreciated.
Thanks,
Rick
|
 |
 |
eratech
Posts: 513
|
Posted: 12/14/2016, 3:58 AM |
|
Rick - sorry for not replying sooner. Been concentrating on end of year work.
Years ago I did a similar thing with an IMG src pointing to an asp page that received an ID and returned the BLOB data and the browser was none the wiser.
Nowadays with more clever browsers you can use some combination of Base64 conversion and the IMG Src with a data uri.
Example of Data uri is here: http://stackoverflow.com/q/1207190
The data should be converted to Base64 as its more web safe and doesn't chuck binary around (I'm assuming you have a SQL server BLOB field holding the image)
See this example: http://blog.falafel.com/t-sql-easy-base64-encoding-and-decoding/
Let me know if you have problems with it and I can code up an example.
Eric
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia |
 |
 |
|