c# write big files to blob sqlite
Posted
by brizjin-gmail-com
on Stack Overflow
See other posts from Stack Overflow
or by brizjin-gmail-com
Published on 2010-05-20T13:06:36Z
Indexed on
2010/05/20
13:10 UTC
Read the original article
Hit count: 654
I have c# application which write files to sqlite database. It uses entity fraemwork for modeling data. Write file to blob (entity byte[] varible) with this line:
row.file = System.IO.File.ReadAllBytes(file_to_load.FileName); //row.file is type byte[]
//row is entity class table
All work correctly when files size is less. When size more 300Mb app throw exception: Exception of type 'System.OutOfMemoryException' was thrown.
How I can write to blob direct, without memory varibles?
© Stack Overflow or respective owner