Pages

Wednesday, October 20, 2010

Overiview and Detail Description of Sharepoint CAML Query

Hello Friends

This article gives very nice description for CAML Query.
http://sharepointmagazine.net/technical/development/writing-caml-queries-for-retrieving-list-items-from-a-sharepoint-list

Disha Shah

11 comments:

  1. HI Dishasha,

    I am new to sharepoint here is my query. i am working on MOSS 2007, SQL server 2008

    I want to move the sharepoint security groups, ACL(access control list), user groups all the security and permission related data to sql server 2008 from a particular site collection or subsite. After getting the data in to sql server we should be able to update the users from sql server itself which should reflect in sharepoint sites.


    Regards,
    jeevan

    ReplyDelete
  2. Hi Dishasha,

    can you please have a look into my problem

    I want to move the sharepoint security groups, ACL(access control list), user groups all the security and permission related data to external database sql server 2008 from a particular site collection or subsite. can i do this task by using sharepoint webservices and object model. if you have any info on this topic can you please let me know.

    Regards,
    jeevan

    ReplyDelete
  3. Jeevan

    I have looked to your challenge, and I cannot get your requirement may be because of some insufficient information "I want to move the SharePoint security groups, ACL(access control list), user groups all the security and permission related data to external database sql server 2008 from a particular site collection or subsite" but where?

    So I cannot understand what you would like to do?

    Because every SharePoint has content database in SQL Server where all SharePoint information is stored.SQL databases in SharePoint shouldn't be directly modified in any way ever.

    You can update users and their permissions directly using the SharePoint API's or Object Model. That would be the correct way to write code to manage the user permissions.

    Thanks
    Disha Shah

    ReplyDelete
  4. Hi Disha shah,

    Thanks for your reply, here is my task and my doubts

    Tasks
    1.i want to get the usergroups data in to sql server(external database) by using built in sharepoint webservices and object model. which you have said at last
    (You can update users and their permissions directly using the SharePoint API's or Object Model. That would be the correct way to write code to manage the user permissions). i will check in your blog if you have written any article on this topic

    Doubt
    1.I would like to use the sharepoint webservices to read the security features in SharePoint and make populated model in SQL(external database not content database) is this possible

    Regards,
    Jeevan

    ReplyDelete
  5. Hi Jeevan

    Yes as I said last it means that you can update users and permissions by using Object Model or Webservices but in SharePoint Environment itself .

    http://Server_Name/[sites/][Site_Name/]_vti_bin/UserGroup.asmx.

    Methods which are supported by this webservices:
    http://msdn.microsoft.com/en-us/library/ms774345(v=office.12).aspx

    This is the Webservice name which contains more than 30 methods to perform the usergroup and security related tasks, So use this webservices and its methods to get the data and perform SQL server operations.

    Hope this helps
    Disha Shah

    ReplyDelete
  6. Hi Disha shah,

    thanks for your reply, i have written a small windows application program. i have added the usergroup webservice reference. here is my program

    namespace WindowsFormsApplication1
    {
    public partial class Form1 : Form
    {
    public Form1()
    {
    InitializeComponent();
    }

    private void button1_Click(object sender, EventArgs e)
    {
    ServiceReference1.UserGroup usrgrpService = new ServiceReference1.UserGroup();
    usrgrpService.Credentials = System.Net.CredentialCache.DefaultCredentials;
    usrgrpService.Url =
    "URL_vti_bin/UserGroup.asmx";

    XmlNode ndUsers = usrgrpService.GetUserCollectionFromWeb();

    MessageBox.Show(ndUsers.OuterXml);
    }
    }
    }

    i am getting the following error
    the type or namespace name "UserGroup" does not exist. can i know where i am doing the mistake

    Regards,
    jeevan

    ReplyDelete
  7. Jeevan

    usrgrpService.Url = "URL_vti_bin/UserGroup.asmx";

    On the above line you are doing mistake.
    To access this Web service set a Web reference to http:///_vti_bin/UserGroup.asmx

    Provide Site URL.

    Best Regards
    Disha Shah

    ReplyDelete
  8. Jeevan

    Find the example for webservices here,
    http://www.developer.com/tech/article.php/3104621/SharePoint-and-Web-Services.htm

    http://www.codeguru.com/csharp/csharp/cs_webservices/tutorials/article.php/c8805

    http://forums.asp.net/t/1012092.aspx (C# Example)
    Hope all these links helps

    Thanks
    Disha Shah

    ReplyDelete
  9. HI Disha,

    Can u help me on info path, my requirement is, In Info path form i have added a RichTextbox control, i want to count the no of charchters enter in RichTextbox and display the number in the upper RichTextbox control.
    Can u tell me how to do that ?
    if we can use outof box like formulas , plz tell me the steps or if programming , plz send me links.

    Regards
    mansoor

    ReplyDelete
  10. Hi Mansoor

    I have checked your comment on wordpree blog but please leave comment to new blog site only.

    To get number of characters you can use RichtextBox's String Lenght property to get that and you can write the Changedevent of richtext box.

    Hope this helps
    Disha Shah

    ReplyDelete
  11. Hi Disha,
    I want to display all sharepoint custom lists in infopath Controls. like listbox.

    Note: Multi selectlistbox control does not support browser enable form,so i choose listbox conrol.

    can u give me idea, how to do programatically..(greate thankful , if u send peice of code )

    thanks
    mansoor

    ReplyDelete