Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2010-08-17
2
Medium Priority
?
345 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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, …
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

618 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