0

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 can 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!

3
  • 1
    Could it have to do with max query size in sql server? Commented Jun 28, 2011 at 13:00
  • @Martin... Where do you do that? Commented Jun 28, 2011 at 13:15
  • 1
    msdn.microsoft.com/en-us/library/ms188362.aspx should help you. Commented Jun 28, 2011 at 14:37

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.