SQL Server 2008 FILESTREAM 进度指示器
我有一个 SQL Server 2008 数据库,其中一个表包含 FILESTREAM varbinary(max) 列。我已将数据库服务器设置为使用文件流,一切正常。我还使用 C# + Entity Framework 4.1 (Visual Studio 2010) 创建了一个客户端应用程序,这也运行良好,我可以毫无困难地读取和写入 varbinary(max) 列。我的问题是这样的:对于非常大的文件,可能需要一段时间才能从数据库上传/下载文件数据。有没有一种方法可以确定已取得多少进展并通知用户?
谢谢!
I have a SQL Server 2008 database with a table that contains a FILESTREAM varbinary(max) column. I have set up the database server to use file streaming and everything works well. I have also created a client application using C# + Entity Framework 4.1 (Visual Studio 2010)—this too works well and I can read and write to the varbinary(max) column without any difficulty. My problem is this: for very large files it can take a while to upload/download the file data from the database. Is there a way that I can determine how much progress has been made and notify the user?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
否,因为 EF 不支持
文件流
。将其映射为varbinary(max)
后,它的访问方式与任何其他varbinary
列完全相同,并且必须完全获取。如果您想利用高级filestream
功能,则必须通过ADO.NET 使用本机SQL。No because EF doesn't support
filestream
. Once you mapped it asvarbinary(max)
it is accessed in exactly same way as any othervarbinary
column and must be completely fetched. If you want to take advantage of advancedfilestream
features you must use native SQL through ADO.NET.