views:

289

answers:

1

Hi,

I need to modify a file (text file) in a SharePoint document library. Tried to open a stream using SPFile.OpenBinaryStream() and write the data. But it doesn't work out. Any help/ suggestion would be appreciated.

A: 

Have you used the SaveBinary method?

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfile.savebinary.aspx

and depending on the doc library settings you may need to do a SPFile.CheckIn to commit the changes.

DJ