CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 How to pull from a SQL Image field and Display them in a Grid

Print topic Send  topic

Author Message
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
View profile  Send private message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.