Solved

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

Posted on 2010-08-17
2
339 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 500 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL - format decimal in a string 5 49
PolyServe for SQL server 13 40
Using this function 4 38
Linked Server - SP with Param to VIew 7 19
Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

679 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