0

Is there any way to post a word document to a document library using the ADO.NET data services?

EDIT: I can query and save data to lists using a service:

http://msdn.microsoft.com/en-us/library/ee535480.aspx

Is there no way to upload a document using the same mechanism?

1 Answer 1

2

You wouldn't be able to use ADO.NET since that is a DB framework but you could leverage the SharePoint Object Model and Upload the file as a stream to SharePoint Document Library.

2
  • Thanks for the answer. I'm using ADO.NET data services to access sharepoint, but can't find a way to upload document data. I've edited my question to add a reference to that. Does this answer still apply?
    – GC.
    Commented Nov 2, 2012 at 15:43
  • I would say that you would have to save it in the field as a byte array because since the object model returned is strongly typed I am sure that is a attachment field of some sort that has a byte array type or some type of stream... I don't know how it would determine the type of document uploaded though since it is binary and you would need some mime type field to tell sharepoint what kind of file it is. Commented May 29, 2013 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.