在SQL Server存储图像使用C# [英] Storing images in SQL Server using C#
问题描述
我要存储我的员工的图像与在SQL Server数据库SQL他们的个人资料的细节,但我有下列保留:
I want to store images of my employees with their profile details in SQL in a SQL Server database, but I have following reservations:
我应该融为一体preSS图像或没有,如果有,请能为社会各界提供样品我code或直接我可以帮助我这个指南。
Should I compress images or not and if yes, please can the community provide me sample code or direct me to a guide that can assist me with this.
我应该如何有效地检索图像?我怕asp.net应用程序性能问题。我认为,与成千上万的员工记录时,系统可能会停止或减慢。
How should I retrieve images efficiently? I am afraid of asp.net application performance issues. I think with thousands of employee records, the system may halt or slow down.
推荐答案
我会建议存储在SQL表中的图像的路径,实际上是图像存储在一个安全的文件夹中。这工作对我来说非常完美。
I would suggest storing the path of the images on your sql table, and actually store the image in a secure folder. This has worked for me perfectly.
这篇关于在SQL Server存储图像使用C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!