We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Display SQL Image data type in template

How can we display a thumbnail of an image stored in an MS SQL database as a data type image? The template display docs shows how to template a static image but not a dynamic one. Thanks.

3 Replies

RE Responsive Edge December 29, 2019 11:14 AM

FYI, the image data type has been deprecated and will no longer be supported in future SQL Server versions, so I wouldn't use it for any new development: https://docs.microsoft.com/en-us/sql/t-sql/data-types/ntext-text-and-image-transact-sql?redirectedfrom=MSDN&view=sql-server-ver15


SP Scott Peal December 31, 2019 04:24 PM

Thanks for the info. We are using bytes. 


SA Shameer Ali Baig Sulaiman Ali Baig Syncfusion Team January 2, 2020 05:35 AM

Hi Scott, 
  
Greeting from Syncfusion support. 
  
We have analyzed your reported query on referring image in EJ2 TreeView which is stored in an MS SQL database as a data type image.  
 
For your information, In EJ2 TreeView component, we have to refer the image URL directly or need to set the base64 as src tag for referring an image in a node.  
 
Currently, EJ2 TreeView will not support any other formats for referring image. In your case, you can convert the bytesArray into base64 using valid online convertor. After that, you can refer the base64 value in src tag of image. 
 
To know about the image for TreeView. Refer the below links. 
 
Please, let us know If you face any issue while using base64 and image in TreeView component, we are happy to assistance on this regard. 
 
Regards, 
Shameer Ali Baig S. 


Loader.
Live Chat Icon For mobile
Up arrow icon