Click here to Skip to main content
15,891,423 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi i am getting error in silverlight while i upload multiple files more than 100 MB and save in sqlserver then it give out of memory exception. my pc hase 64 bit with window 7 and 8 gb RAM. I check the sql server 2008 process while file uploading it take memory up to 794.52344 MB (800 MB). if upload successfull and file save in sql after closing upload i check again sql server remain take 794.52344 in memory.

So please tell me how i upload more than 100 mb and sql server release memory after uploading.

thanks in advace
sry for weak ennglish
Posted

1 solution

Look at using a buffer to load it in in smaller batches. Have a look at the following tutorial:

http://zombiebob.blogspot.com/2010/08/large-file-upload-in-silverlight.html[^]

Hope this helps.

Update: Ok, so you have a varbinary(max) field in your DB. Create a function that appends data to that field, as your service receives data, append that data to the field! Remember that Silverlight is asynchronous so make sure you are sending your data in the right order otherwise it will break!
 
Share this answer
 
v2
Comments
Ram Kumar(Webunitech) 16-Mar-12 4:56am    
Dear sir i check it but how to save chunk in sqlserver i am using generic handler to save image in db not in file system. please give me a exmaple how to save chunk in db or after uploading how sql server release the having memory
DominicZA 16-Mar-12 5:21am    
Updated
Ram Kumar(Webunitech) 16-Mar-12 7:10am    
dear sir i have a varbinary(max) field in my db but how i appends the chunks in generic handler because generic file fuction processrequest() call again and again when new chunk is send by silverlight. i try to append chunk in silverlight but i not able to append. i search on internet also but i not found any solutions. please provide a example how to append chunk and save in db.
thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900