开发者

LINQ saving images to varbinary

I'm having issues saving images to a varbinary(Max) field using LINQ. I can save files in the region of 10KB to the database no problems, but when it comes to files bigger than that, it's as though it doesn't even try.

I've had a look in the SQL Server Profiler and when the file is around 10KB I c开发者_如何学Goan see the full insert statement in the detail pane. However, when the file is a bit bigger, the detail pane doesn't show anything, although any data besides the varbinary field is written to the database.

The data is in the Data Object just before SubmitChanges so I can't figure out what's happening between now and then!


Looks like the data was there after all. It seems it is too big to show in both the SQL Server Profiler and in SQL Managemnet studio when you do something like

SELECT * FROM DataTable

When you actually re-constitute the binary data from the table it seems it is there. It's a bit misleading though that it just shows an empty field.

Thanks Martin for your help.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜