Link to home
Start Free TrialLog in
Avatar of muskad202
muskad202

asked on

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

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
ASKER CERTIFIED SOLUTION
Avatar of lucky_james
lucky_james
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
Avatar of muskad202
muskad202

ASKER

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.
ok .. got it to work .. careless mistake on my part .. thanks