views:

506

answers:

2

Hi,

I'd like to be able to append some data to a binary field in a MS SQL 2005 server from C# without reading the original data, concatenating it, and then setting it all back.

Is this possible?

Cheers! Steve

+1  A: 

Well, I don't know for a BLOB, but for text you can do this:

UPDATE tablename SET columnname=concat(columnname,' my extra text');

Stormenet
+1  A: 

Read about the UPDATETEXT sql statement at http://msdn.microsoft.com/en-us/library/3517w44b.aspx. The Msdn article contains example code that appends binary data to a blob in the StorePhoto method.

Simon Svensson