0

I have a situation where I am uploading an image in sharepoint and it is being saved using blob. I need to create an XML file with the data of the blob and other data that helps users to identify it. The following is a hint of what I want

<image>
    <name>mydog</name>
    <extension>.jpg</extension>
    <blobid>0234234</blobid>
    <blobpath>435343445</blobpath> </image>

I was looking at the tables in wss_content and came up to alldocumentstreams where there is a column called rbsid. unfortunately I cannot link this id to non of my documents. My question is this is there a way how i can get all the blob information from the DB so i can link it to other details?

5
  • Yes there is, if you would consider using an ADO.NET adapter for SharePoint. Commented Jul 15, 2011 at 19:32
  • i am considering everything at the moment. all i want is to get the file path where the blob file is and the blob name for that particular file. Can you please help me out to understand how this can be done? Commented Jul 16, 2011 at 8:11
  • One of us is missing the point - the blob is stored in the database - stored in a file mixed in with gazillions of bytes of other data. It isn't just a file on its own. Commented Jul 16, 2011 at 14:29
  • Sure, but I need some more info. Is the file stored in a list or in a document library? Commented Jul 16, 2011 at 21:32
  • documents are being uploaded in a list and there will be no alterations to it for sure. Commented Jul 17, 2011 at 9:14

1 Answer 1

2

Directly accessing the SharePoint database isn't supported by Microsoft.

If a server component requires information from the database, it must get that data by using the appropriate items in the SharePoint object model, and not by trying to get the items from the data structures in the database through some query mechanism.

You might be better using the SharePoint object model to read these files.

Some links that should help

Sign up to request clarification or add additional context in comments.

3 Comments

Is there a way to create an XML file with metadata in the same directory where the blob column saves the actual data file?
The blob column doesn't save a file in a directory (unless you're using external blob storage, but thats another story) a better way of doing this is storing metadata in columns in the document library - see that first link for details.
hi ryan, 10x for your answer. so aparently one cannot get the physical path where the binary data is neither through code nor through sql? Manually i found the path where the blobs are being saved and i know it is C:\Sharepoint\2342..... There is no way I can get that?

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.