?
Solved

Chunking to ntext / image columns in SQL Server Compact Edition 3.5

Posted on 2010-08-17
2
Medium Priority
?
349 Views
Last Modified: 2012-05-10
Hi all!

I'm trying to store (potentially) large files in a SQL Server Compact Edition SDF file, via a table with an image column.  Image columns hold up to 2GB.

Every SQL CE example I've found which does this reads the whole file into a Byte array, then passes the array in a SqlCeParameter.   This is fine assuming that the file is small, or the code is run on a machine with plenty of memory.  But if, for example, you're trying to store a 1GB file on a PC with 512Mb, the whole file cannot be buffered in one go (without paging).

What I want to be able to do is read and store "chunks" of a file into an image col.  E.g. http://support.microsoft.com/kb/317034    I think this approach is both faster and more mem efficient.   It is possible on SQL Server 2008 etc., using either UPDATETEXT or UPDATE ... [column name].write( ..., ..., ...).   However, SQL CE doesn't appear to support either syntax.

So, I guess my question boils down to: is it possible to store a 2Gb file in an SQL CE image column on a PC with 1GB of mem. (without spending ages paging)

Thanks in advance,

Ben.
0
Comment
Question by:ben84
2 Comments
 
LVL 13

Accepted Solution

by:
sameer2010 earned 2000 total points
ID: 33456370
Looks like it is not possible directly.
http://www.sqlmonster.com/Uwe/Forum.aspx/sql-server-ce/564/UPDATETEXT

Open in new window

0
 

Author Closing Comment

by:ben84
ID: 33456477
Thanks sameer2010.
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Long way back, we had to take help from third party tools in order to encrypt and decrypt data.  Gradually Microsoft understood the need for this feature and started to implement it by building functionality into SQL Server. Finally, with SQL 2008, …
This shares a stored procedure to retrieve permissions for a given user on the current database or across all databases on a server.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question