Opening a file stored in a database in .NET.

I am storing a Word document in a SQL Server 2005 database in a varbinary (max) column. Is there a way to open this document from a VB.NET Windows Forms application without serializing to a file first (i.e., directly from the byte array that I read from the database)?

+3
source share
2 answers

Depends on what reads it. If it's Word, you probably have to serialize the file, but if it's a function or library that can take IO.Stream, then you can wrap a new MemoryStream around an array of bytes and pass that.

+3
source

. , , .

+2

Source: https://habr.com/ru/post/1696810/


All Articles