We help IT Professionals succeed at work.

Writing data to a VARBINARY(MAX) column (SQL Server) in chunks using ADO.NET 2.0

muskad202
muskad202 asked
on
2,168 Views
Last Modified: 2012-05-05
Hi!
I'm trying to write data using ADO.NET 2.0 (C#) to a VARBINARY(MAX) column in SQL Server. I'm trying to write the data in chunks. I followed the example given on http://support.microsoft.com/kb/317034.
However, I get the error that TEXTPTR cannot be used with VARBINARY(MAX).
Does anyone know the correct way to do this?
Thanks,
muskad202
Comment
Watch Question

This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Furthermore,A text pointer cannot be used to update BLOB values when the isolation level of the transaction is read uncommitted, or the database is in read-only mode.

Check out:
http://msdn2.microsoft.com/en-us/library/ms191262.aspx

Author

Commented:
Hi!
I tried using the .WRITE function, but i get the error that the write() mutator cannot be used on a null value. This is even though I already set the varbinary column to a dummy "0x0" value before calling the Write() function.

Author

Commented:
ok .. got it to work .. careless mistake on my part .. thanks
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.