Which datatype for base64 encoded image?

人盡茶涼 提交于 2019-12-11 14:56:29

问题


Question: In order to store logos in a database and display them dynamically in ms-reporting service, I need to base64 encode the image. It doesn't work with binary saved images, due to MS limitations...

Now my question: Which datatype do I use? Varchar, nvarchar or text?

I guess varchar would be good enough, since base64 encoded, but images might be larger than 4000 characters...


回答1:


Varchar(max) supports up to 2GB, and since the data is already base64 encoded, unicode storage won't be required.

http://www.sqlskills.com/BLOGS/PAUL/post/Importance-of-choosing-the-right-LOB-storage-technique.aspx



来源:https://stackoverflow.com/questions/3363421/which-datatype-for-base64-encoded-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!