Access DB to SharePoint

Hi
What options do I have moving an access database with several tables and relationships to sharepoint?
Are there two methods ?
1. convert access to lists/lookups
2. run access under access services, does this retain tables and relationships?
The other question about Access itself is that some tutorials mention converting database to 'Web Database', is this a required step?
When I created a Web Database the relationships is grayed out.
Thanks

Hi,
You have two method to publish your Access database to SharePoint.
1.You can export access database to a SharePoint list:
http://plexhosted.com/billing/knowledgebase/275/How-to-publish-Access-2013-database-on-a-SharePoint-2013-Enterprise-site.html
2. Build and publish an Access database to SharePoint.
When you publish a web database, Access Services creates a SharePoint site that contains the database. All of the database objects and data move to SharePoint lists in that site.
https://support.office.com/en-us/article/Build-and-publish-an-Access-database-to-SharePoint-e68bf007-410c-43b2-bf21-322ddbcf5411?CorrelationId=c609c05b-508e-4e6e-b9b8-5bae2b083336&ui=en-US&rs=en-US&ad=US
And you can retain tables and relationships.
Best Regards,
Lisa Chen
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected]

Similar Messages

  • "An error occurred accessing your Microsoft SharePoint Foundation site files" connecting site with SharePoint Designer

    I have a SharePoint 2013 environment with 1 AD Server, 1 DB Server and 1 APP Server, with 13 Web Applications running under the SharePoint.
    Recently I rebuilted the application because of some infrasctrucutre problems, and I was able to solve all of them, except one. I can't connect to any of those 13 Web Apps with SharePoint Designer. When I try to connect, it always ask credentials, then it
    seems like loading the site, then the error appears:
    "An error occurred accessing your Microsoft SharePoint Foundation site files. Authors - if you are authoring against
    a Web server, please contact the Webmaster for this server's Web site. WebMasters - please see the server's application event log for more details."
    I've spent hours troubleshooting it, but none of the information I found was valid. I've already tried to clean the cache, but didn't work. I found plenty of related data of this
    error with FrontPage and old versions of SharePoint, but nothing helped. All the Web Apps are SPD-Enabled at Site Collection Administration. I've tried connecting from many different PC's. The 15/LOGS folder doesn't get any data from this error, neither the
    Event Viewer.
    I really don't know what else to do. Please Help!

    I found the answer of my issue was in a .NET Agent installed by NewRelic on the server. I found a connection trouble with Fiddler, then I end up figuring this out:
    This can be the result of Real User Monitoring so the first step in troubleshooting would be to disable it and see how it affects the application. The .Net Agent injects snippets of javascript into the header of pages sent to the users browser to measure the
    page load time on the user's end.
    You can disable RUM by editing newrelic.config and changing this line:
    <browserMonitoring autoInstrument="true"/>
    to this:
    <browserMonitoring autoInstrument="false"/>

  • Unable to Publish Access database to SharePoint site in 2013

    I have a user requesting to publish access (2007/2010) web database into SharePoint 2013. I am able to publish this database on all sites under one site collection (test) but fails on the other site (different site collection). I have compared site collection
    and site features and both site collection (working and non-working one) has SharePoint Server Enterprise Site features enabled. Is there any other features that should be turned on? 
    Initially it looks it has succeded but then give mesesage
    "Publish Failed - Your application has encountered errors while attempting to publish. The publish operation has failed and the target site has not been created. For more details, see the following tables
    Moveto SharePoint Site Issues"
    Move to SharePoint Site Issues
    Issue
    Reason
    Object Type
    Object Name
    Field Name
    There was an error uploading properties and/or data macros on this table.
    Table
    mytab
    Errors have prevented one or more tables from being uploaded to the server.
    Table
    Could not save this object's changes to the server. You must enter a value in the 'Name' field.
    Navigation Pane
    Navigation Pane
    Could not save this object's changes to the server. You must enter a value in the 'Name' field.
    VBA Properties
    VBA References
    Could not save this object's changes to the server. You must enter a value in the 'Name' field.
    Database Properties
    DBProps
    Could not save this object's changes to the server. You must enter a value in the 'Name' field.
    Theme
    Office Theme
    <tfoot></tfoot>
    I am unable to make any sense as it's one empty table and able to publish same table on another site (under different site collection). 
    MK Sin

    Hi MK,
    According to your description, my understanding is that you got an error when you published Access database to SharePoint 2013.
    Please deactivate SharePoint Server Enterprise Site Collection features at site collection level and deactivate SharePoint Server Enterprise Site features at site level, then activate them again, compare the result.
    Per the error message, please type a value in the ‘Name’ filed, then publish the table, compare the result.
    In addition, here is a similar article, please check whether it is useful for you:
    http://support.microsoft.com/kb/2711562
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • How to make report with access 2010 from SharePoint Discussion lists 2013

    HI,
    I want to make an access report from SharePoint Discussion lists 2013. When i open the list with access, the body of the list is in HTML format in access. Also if i reply something to one subject in the discussion, the reply is not mapped to that subject
    but instead it is shown as a separate entry in the database.
    Anyone can please help?
    SAN
    Santhiya
    Santhiya

    Hi Santhiya,
    I have seen a similar post from you, my understanding is that you wonder that the reply is mapped to the related subject. You can take a look at Daniel's reply in the following thread:
    http://social.technet.microsoft.com/Forums/en-US/dfb5bcb9-0076-412a-b34f-46aa9cfba876/how-to-make-report-with-access-2010-from-sharepoint-discussion-lists-2013?forum=sharepointgeneral
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Access reports in SharePoint 2010.

    Dear All,
    I have SharePoint 2010 list. I have took this list in access database. I have save as the access database on physical location.
    After I have created on report in access. It's run fine in access.
    Now I want to show(run) this report in SharePoint list or library. Just like we are doing for SSRS.
    Can anyone please help me how to show access report in SharePoint 2010?
    Thanks,
    Harish Patil

    Hi,
    According to your post, my understanding is that you want to show Access reports in SharePoint 2010.
    We can publish the Access Reports to SharePoint 2010 via Access Services, the following links for your reference:
    Publish to SharePoint
    http://blogs.office.com/b/microsoft-access/archive/2009/11/23/publish-to-sharepoint-part-1.aspx
    Reporting Services in SharePoint 2010, Access Services
    http://blogs.msdn.com/b/robertbruckner/archive/2010/04/25/reporting-services-in-sharepoint-2010-access-services.aspx
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Access Database in sharepoint 2013

    We have a new server here at work.  One of the virtual servers on this server has an installation of sharepoint 2013.  I have installed and configured many previous installations of sharepoint, 2013 is quite the different animal and I am working
    through trying to figure out how to set it up and use if for our company.
    A fellow employee was setting up an access 2013 database of our staff who does all of our construction.  We were successfully able to publish this access database to the sharepoint server from with in the Access 2013 environment.
    I am in sharepoint and I don't see the list that represents the access database.  Am I missing something here on how to make it display?

    When you publish a web database, Access Services creates a SharePoint site that contains the database. All of the database objects
    and data move to SharePoint lists in that site.
    Build and publish an Access database to SharePoint
    http://plexhosted.com/billing/knowledgebase/275/How-to-publish-Access-2013-database-on-a-SharePoint-2013-Enterprise-site.html
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • No option to edit access files in sharepoint.

    The access files only gives  ‘open’ option & once the file is opened the changes are saved in the copy downloaded in the PC not on the one in the portal?

    Hi Rizzk,
    Based on your description, my understanding is that you cannot save changes to Access files in SharePoint.
    I tested the same scenario per your post, and the changes can be saved back after I clicked Save button in Access.
    I recommend to click Design With Access button or click each Access files and select Modify to see if the issue still occurs.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support
    Can you explain it in little detail.
    My objective is to save a soap file & edit the changes in sharepoint it self. I have saved this file in a document library

  • Displaying Access Data in SharePoint 2010/2013

    We have an old application. The website is designed using Front Page that retrieves data from an Access Database. The web site has a few fields. The user enters the information and hits the Submit Button. The application runs a SQL query and fetches
    data from Access DB. Data then shows up in a Grid.
    I want to create this solution in SharePoint. Still not sure whether the data should reside in SharePoint or in Access.
    What is the best approach?
    I should transfer data into SharePoint from Access. Then prompt the user to enter some data.
    Would InfoPath be a good choice?
    If I leave the data in Access, is Data View Web Part the preferred way to get data?
    Thanks so much!
    Mayank

    Hi Mayank,
    According to your description, my understanding is that you want to dispaly Access Database data in SharePoint.
    If your Access Database is a web database, you can publlish your Access database to SharePoint with the following method:
    http://blogs.technet.com/b/hub/archive/2010/11/08/publish-your-access-database-to-sharepoint.aspx
    https://support.office.com/en-in/article/Edit-or-publish-a-web-database-on-SharePoint-2010-af230551-9801-495d-87b0-75eed01073ac
    If your Access Database is a desktop database, you can publish your Access database to SharePoint with the following method:
    https://www.youtube.com/watch?v=cutjdCTdLQE
    Best Regards,
    Eric
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to Enable Anonymous access to a SharePoint 2013 site e.g for specific site,list etc..

    Hi All,
          I'm working on an extranet and i would like users to be able to fill a form on the site.
    Since i'm going to use sharepoint 2013 how can i configure sharepoint to use both anonymous access and windows authentication at the same time.
    I know for sure it can be done but what can be allowed for anonymous access e.g specific list site etc..
    I would need to make some area available as anonymous e.g a whole site as  i would like to brand it a little to host the form.Any tips of who has configured similar would be appreciated

    Hi Patrick,
    Thanks for posting your query, Kindly follow the below mentioned steps to enable Anonymous access to a SharePoint 2013 site.
    In Central Administration, under Application Management., click Manage web applications.
    Select the web application you want to enable anonymous access for.
    In the Security group on the ribbon, click Authentication Providers.
    In the Authentication Providers dialog box, under Zone, click Default.
    On the Edit Authentication page, select the Enable anonymous access check box.
    Click Save.
    Close the Authentication Providers dialog box.
    Also, browse the below mentioned URLs for more details
    http://blog.cloudshare.com/2012/10/15/how-to-enable-anonymous-access-to-a-sharepoint-2013-site/
    http://www.sharepoint-journey.com/how-to-enable-anonymous-access-in-sharepoint-2013.html
    I hope this is helpful to you, mark it as Helpful.
    If this works, Please mark it as Answered.
    Regards,
    Dharmendra Singh (MCPD-EA | MCTS)
    Blog : http://sharepoint-community.net/profile/DharmendraSingh

  • Access 2013 and SharePoint Foundation/Server 2010

    I have a real simple scenario that keeps happening.
    I simple click external data -> More -> SharePoint List from Access 2013 and point it to a SharePonint 2010 list ... then link the list.  It will link and show the data.  Once...  After closing the access file, it just freezes when opening
    it again.
    I've tried this on several windows clients (win7 and 8) and 2 different SharePoint 2010 installs (1 being Foundation, the other being Server).  Both are service packed.
    Any ideas?

    I believe i too am running into this issue.
    I have a CRM application i created in Access 2010 which links to lists on Sharepoint Foundation 2010 (As bundled with Small Business Server 2010) using SSL. I have this application running on various client machines, some on the local network and some via
    the internet. Until now we have been entirely Access 2010 and whenever a new client was required i just copied over the Access front end and it just worked.
    We have a new PC which has Win7 Pro 64bit and Office 2013 Pro. I copied over the front end but when i try and open one of the linked sharepoint lists Access just hangs with the spining circle. I have no problem accessing these lists on SP via Internet Explorer
    and furthermore if i select "Open with Access" and link a list it then opens within Access 2013 OK, (although Windows Security does prompt for the users password). However, if i save this database and re-open it i can no longer open the list!!
    I have noticed that if i run Access 2013 as administrator and open the front end application then there is no problem.
    Possible permissions issue???
    If i repeat what Eric describes, Access 2013 shows me all the lists on out SP site and successfully links it (i.e. It appears under Tables) however, unlike Eric the list won't open (not even once).

  • How can I add a trusted site in Safari to access our secure Sharepoint site from the internet?

    My company has a secure sharepoint site that we access from the internet that requires our Active Directory logon. The Safari on the iPad does not allow you to add the URL as a trusted site and thus it prompts you for your username and password multiple times when navigating to various content.  The solution for full blown browsers is to just add the URL as a trusted site in your browser security settings.  Is there a work around for this or will Apple perhaps add this capability to add trusted sites to the mobile version of Safari?

    Non-Windows browsers do not have a concept of a "trusted" site. In Windows, IE and Chrome do not repeatedly prompt for credentials because they use the user's login credentials on the desktop. Other devices do not have this capability. Instead,
    you need to use something like ADFS to authenticate users.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Is it possible to restrict access to individual SharePoint Online sites (or site collections) to users only connecting when on the corporate network?

    Hi,
    We have an Office 365 environment which is linked to our on premise ADFS environment. We have started to make some deployments of sites to our SharePoint Online environment. For the majority of sites this is great and the ability to access the sites
    from anywhere is a real bonus. However, there are some sites and data that I would be much more comfortable in migrating to SharePoint Online if there were a way to make them only accessible via users/computers connected to the corporate network. 
    I have seen articles in how you can configure ADFS to allow all connections to the Office 365 tenant only from the network or not but what I am after is something which can be configured on a site by site basis (i.e. not the whole Office 365 environment
    or SharePoint Online environment) to only allow access when connecting from the corporate network.
    Any advice/help would be much appreciated?
    Many thanks
    Paul

    Hi,
    This is the forum to discuss questions and feedback for Microsoft Office, the issue is more related to SharePoint online, I recommend you post your question to the Microsoft Office 365 Community Sites and document sharing Forum
    http://community.office365.com/en-us/f/154.aspx
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    Thanks
    George Zhao
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please click "[email protected]"

  • Error Accessing Report in SharePoint Integrated Mode (SQL Server 2008 with SharePoint 2007)

    I have installed reporting services with SharePoint Integration Mode, however, whenever I access the report, below error occurs:
    Report Server has encountered a SharePoint error. (rsSharePointError)
    Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))
    Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION)
    Checking through the Log Files, there is more detailed error message, but not sure what cause the error:
    library!ReportServer_0-2!4064!11/01/2010-15:00:39:: Call to GetPermissionsAction(http://[servername]/sites/Reporting/Reports/TestReport.rdl).
    library!ReportServer_0-2!4170!11/01/2010-15:00:39:: Call to ListParentsAction(http://[servername]/sites/Reporting/Reports/TestReport.rdl).
    library!ReportServer_0-2!4170!11/01/2010-15:00:40:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.SharePointException: Report Server has encountered a SharePoint error., ;
     Info: Microsoft.ReportingServices.Diagnostics.Utilities.SharePointException: Report Server has encountered a SharePoint error. ---> Microsoft.SharePoint.SPException: Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION)) --->
    System.Runtime.InteropServices.COMException (0x80020009): Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))
       at Microsoft.SharePoint.Library.SPRequestInternalClass.GetFileAsByteArray(String bstrUrl, String bstrWebRelativeUrl, Boolean bHonorLevel, Byte iLevel, OpenBinaryFlags grfob)
       at Microsoft.SharePoint.Library.SPRequest.GetFileAsByteArray(String bstrUrl, String bstrWebRelativeUrl, Boolean bHonorLevel, Byte iLevel, OpenBinaryFlags grfob)
       --- End of inner exception stack trace ---
       at Microsoft.SharePoint.Library.SPRequest.GetFileAsByteArray(String bstrUrl, String bstrWebRelativeUrl, Boolean bHonorLevel, Byte iLevel, OpenBinaryFlags grfob)
       at Microsoft.SharePoint.SPFile.GetFileContent(SPOpenBinaryOptions openOptions)
       at Microsoft.SharePoint.SPFile.OpenBinary(SPOpenBinaryOptions openOptions)
       at Microsoft.SharePoint.SPFile.OpenBinary()
       at Microsoft.ReportingServices.SharePoint.Server.SharePointServiceHelper.SyncToRSCatalog(String path, Boolean createOnly)
       --- End of inner exception stack trace ---
    library!ReportServer_0-2!4064!11/01/2010-15:00:40:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.SharePointException: Report Server has encountered a SharePoint error., ;
     Info: Microsoft.ReportingServices.Diagnostics.Utilities.SharePointException: Report Server has encountered a SharePoint error. ---> Microsoft.SharePoint.SPException: Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION)) --->
    System.Runtime.InteropServices.COMException (0x80020009): Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))
       at Microsoft.SharePoint.Library.SPRequestInternalClass.GetFileAsByteArray(String bstrUrl, String bstrWebRelativeUrl, Boolean bHonorLevel, Byte iLevel, OpenBinaryFlags grfob)
       at Microsoft.SharePoint.Library.SPRequest.GetFileAsByteArray(String bstrUrl, String bstrWebRelativeUrl, Boolean bHonorLevel, Byte iLevel, OpenBinaryFlags grfob)
       --- End of inner exception stack trace ---
       at Microsoft.SharePoint.Library.SPRequest.GetFileAsByteArray(String bstrUrl, String bstrWebRelativeUrl, Boolean bHonorLevel, Byte iLevel, OpenBinaryFlags grfob)
       at Microsoft.SharePoint.SPFile.GetFileContent(SPOpenBinaryOptions openOptions)
       at Microsoft.SharePoint.SPFile.OpenBinary(SPOpenBinaryOptions openOptions)
       at Microsoft.SharePoint.SPFile.OpenBinary()
       at Microsoft.ReportingServices.SharePoint.Server.SharePointServiceHelper.SyncToRSCatalog(String path, Boolean createOnly)
       --- End of inner exception stack trace ---
    Any idea on how to resolve the issue?

    Hi Jin Chen,
    Thank you for your response. I have disabled all the Symantec End Point Protection Service, but problem persists..
    Further, I have checked through the ULS Log in SharePoint, there is more error reported there:
    11/03/2010 15:19:48.44 ReportingServicesService.exe (0x3510)  
    0x4064
    Windows SharePoint Services   Database                      
    6f8g Unexpected
    Unexpected query execution failure, error code 282. Additional error information from SQL Server is included below. "The 'proc_GetTpWebMetaDataAndListMetaData' procedure attempted to return a status of NULL, which is not allowed. A status of 0 will be
    returned instead." Query text (if available): "{?=call proc_GetTpWebMetaDataAndListMetaData(?,'F77D6A37-F8D2-492C-911C-923C8A135DEB',?,NULL,1,?,?,6187)}"
    11/03/2010 15:19:51.46 ReportingServicesService.exe (0x3510)  
    0x4064
    Windows SharePoint Services   General                      
    8e2s Medium  
    Unknown SPRequest error occurred. More information: 0x80020009
    11/03/2010 15:19:51.69 ReportingServicesService.exe (0x3510)  
    0x1EEC
    Windows SharePoint Services   General                      
    8e2s Medium  
    Unknown SPRequest error occurred. More information: 0x80020009
    Do you have any idea based on the error above?

  • Slow access to mapped Sharepoint drive

    Hi there.
    One of our clients is running SBS 2008 with Sharepoint installed as per default settings. Everything appears to work normally on a day to day basis.
    In order to manipulate files they have a number of mapped drives which lead to particular documents libraries. This allows them to for example, attach a document to an email (which you can't do through the normal SharePoint web interface. Likewise they save
    accounts documents (from Sage) straight to these folders.
    The issue is that from time to time these mapped drives respond very slowly ie normal access to the map drive would be a second or two and then for a period of a day or so drive access may reduce to 10 or 20 seconds. This will continue for a day or so and
    then go away. What is also strange is that this slowness doesnt effect all users at the same time ie one user may get normal access while another grinds to a halt. It doesnt appear to be a network issue as other network services appear to work fine during
    these slow downs ie acess to a normal mapped folder on the server.
    I cant see anything obviously wrong (error logs etc) but im not really sure where to go with this one.
    Martyn Fewtrell
    [email protected]

    Thanks Martyn for
    your solution. I was also facing this issue. Now its coolllll.....Thanks a lot

  • Setting Item level access rights on sharepoint list item in ItemAdding event handler

    Hi ,
    I am using sharepoint 2013. I am trying to set item level access rights when a list item is added using the following code snippet,
    public override void ItemAdding(SPItemEventProperties properties)
    base.ItemAdding(properties);
    ConfigureItemSecurity(properties);
    private void ConfigureItemSecurity(SPItemEventProperties properties)
    var item=properties.ListItem;
    SPSecurity.RunWithElevatedPrivileges(delegate()
    using (SPSite site = new SPSite(properties.SiteId))
    using (SPWeb oWeb = site.OpenWeb())
    item.ParentList.BreakRoleInheritance(true);
    oWeb.AllowUnsafeUpdates = true;
    var guestRole = oWeb.RoleDefinitions.GetByType(SPRoleType.Reader);
    var editRole = oWeb.RoleDefinitions.GetByType(SPRoleType.Editor);
    SPGroup HRGroup = oWeb.SiteGroups.Cast<SPGroup>().AsQueryable().FirstOrDefault(g => g.LoginName=="HR Team");
    SPRoleAssignment groupRoleAssignment = new SPRoleAssignment(HRGroup);
    groupRoleAssignment.RoleDefinitionBindings.Add(guestRole);
    SPUserCollection users = oWeb.Users;
    SPFieldUserValueCollection hm = (SPFieldUserValueCollection)item["HiringManager"];
    SPFieldUserValueCollection pm = (SPFieldUserValueCollection)item["ProjectManager"];
    SPFieldUserValueCollection pmChiefs = (SPFieldUserValueCollection)item["ProjectManagerChief"];
    item.BreakRoleInheritance(true);
    item.RoleAssignments.Add(groupRoleAssignment);
    foreach (SPFieldUserValue staffMember in hm)
    SetRightsOnItem(item, staffMember, editRole);
    foreach (SPFieldUserValue staffMember in pm)
    SetRightsOnItem(item, staffMember, guestRole);
    foreach (SPFieldUserValue staffMember in pmChiefs)
    SetRightsOnItem(item, staffMember, guestRole);
    item.Update();
    private void SetRightsOnItem(SPListItem item, SPFieldUserValue staffMember, SPRoleDefinition role)
    SPUser employeeUser = staffMember.User;
    var userRoleAssignment = new SPRoleAssignment(employeeUser);
    userRoleAssignment.RoleDefinitionBindings.Add(role);
    item.RoleAssignments.Add(userRoleAssignment);
    Nothing is happening though... Is the event handler the right place to do this?
    thank you

    Hi ,
    You can refer to the code working in my environment:
    using System;
    using System.Security.Permissions;
    using Microsoft.SharePoint;
    using Microsoft.SharePoint.Utilities;
    using Microsoft.SharePoint.Workflow;
    namespace ItemLevelSecurity.ItemSecurity
    /// <summary>
    /// List Item Events
    /// </summary>
    public class ItemSecurity : SPItemEventReceiver
    /// <summary>
    /// An item was added.
    /// </summary>
    public override void ItemAdded(SPItemEventProperties properties)
    SPSecurity.RunWithElevatedPrivileges(delegate()
    try
    using (SPSite oSPSite = new SPSite(properties.SiteId))
    using (SPWeb oSPWeb = oSPSite.OpenWeb(properties.RelativeWebUrl))
    //get the list item that was created
    SPListItem item = oSPWeb.Lists[properties.ListId].GetItemById(properties.ListItem.ID);
    //get the author user who created the item
    SPFieldUserValue valAuthor = new SPFieldUserValue(properties.Web, item["Created By"].ToString());
    SPUser oAuthor = valAuthor.User;
    //assign read permission to item author
    AssignPermissionsToItem(item,oAuthor,SPRoleType.Reader);
    //update the item
    item.Update();
    base.ItemAdded(properties);
    catch (Exception ex)
    properties.ErrorMessage = ex.Message; properties.Status = SPEventReceiverStatus.CancelWithError;
    properties.Cancel = true;
    public static void AssignPermissionsToItem(SPListItem item, SPPrincipal obj, SPRoleType roleType)
    if (!item.HasUniqueRoleAssignments)
    item.BreakRoleInheritance(false, true);
    SPRoleAssignment roleAssignment = new SPRoleAssignment(obj);
    SPRoleDefinition roleDefinition = item.Web.RoleDefinitions.GetByType(roleType);
    roleAssignment.RoleDefinitionBindings.Add(roleDefinition);
    item.RoleAssignments.Add(roleAssignment);
    Thanks,
    Eric
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected].
    Eric Tao
    TechNet Community Support

Maybe you are looking for