Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

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.

share|improve this answer
    
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. Nov 2 '12 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. –  Joseph D Surgeon May 29 '13 at 15:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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