Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我将 Word 文档存储在 SQL Server 2005 数据库中的 varbinary(max) 列中。有没有一种方法可以从 VB.NET Windows 窗体应用程序打开此文档,而无需先序列化到文件(即直接从我从数据库中读取的字节数组中)?
取决于阅读它的内容。如果是 Word,您可能必须序列化为文件,但如果它是可以接受 IO.Stream 的函数或库,那么您可以在字节数组周围包装一个新的 MemoryStream 并传递它。
并不真地。您需要将其视为电子邮件附件,通常将文件复制到临时文件夹中,并定期清理。