locked
Database Programming in SharePoint using ASP.Net RRS feed

  • Question

  • Is it possible to access the database tables directly that are created by SharePoint?

    For example, let's say I use SharePoint to put a custome list on one page... but then on another page, I want to create a completely new list, but joining the tables via Primary/Foriegn Key to the same data/tables (i.e. Sales Rep table to Customer table, Product table).

    Is this possilbe?

    Thank you!

    Monday, May 5, 2014 4:24 AM

Answers

  • Hello,

    Which version of sharepoint you are using?

    You shouldn't ever try to access any sharepoint DB and it is not ever recommend. In sharepoint there is different way to maintain relational lists.

    If you are creating a new site then follow below link to create relational lists:

    http://msdn.microsoft.com/en-in/library/ff798514.aspx

    http://zimmergren.net/technical/sp-2010-how-to-relational-lists-in-sharepoint-2010

    Another approach is, use script or server code to get data from multiple lists based on query like SQL. You can use CAML or LINQ to use JOINS mechanism in sharepoint. Refer google/Bing to know more about JOINS.

    Let us know if you have any doubt


    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help


    Monday, May 5, 2014 5:46 AM
    Moderator