Partilhar via


SPView.Update Method

Updates the database with changes that are made to the view.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
<ClientCallableExceptionConstraintAttribute(FixedId := "docnotlocked", ErrorCode := , Condition := "The view is not checked out. You must first check out this document before making changes.",  _
    ErrorType := GetType(SPException))> _
<ClientCallableAttribute> _
<ClientCallableExceptionConstraintAttribute(FixedId := "accessdenied", Condition := "Lack of permissions to perform the write operation.",  _
    ErrorType := GetType(UnauthorizedAccessException))> _
<ClientCallableExceptionConstraintAttribute(FixedId := "viewdne1", Condition := "View does not exist.",  _
    ErrorType := GetType(InvalidOperationException))> _
<ClientCallableExceptionConstraintAttribute(FixedId := "viewdne2", Condition := "View does not exist.",  _
    ErrorType := GetType(DirectoryNotFoundException))> _
<ClientCallableExceptionConstraintAttribute(FixedId := "doclocked", ErrorCode := , Condition := "The view is currently checked out or locked for editing by another user.",  _
    ErrorType := GetType(SPException))> _
<ClientCallableExceptionConstraintAttribute(FixedId := "webnoquota", ErrorCode := , Condition := "Your changes could not be saved because this SharePoint Web site has exceeded the storage quota limit.",  _
    ErrorType := GetType(SPException))> _
<ClientCallableExceptionConstraintAttribute(FixedId := "weblocked", ErrorCode := , Condition := "Additions to this Web site have been blocked.",  _
    ErrorType := GetType(SPException))> _
Public Sub Update
'Usage
Dim instance As SPView

instance.Update()
[ClientCallableExceptionConstraintAttribute(FixedId = "docnotlocked", ErrorCode = , Condition = "The view is not checked out. You must first check out this document before making changes.", 
    ErrorType = typeof(SPException))]
[ClientCallableAttribute]
[ClientCallableExceptionConstraintAttribute(FixedId = "accessdenied", Condition = "Lack of permissions to perform the write operation.", 
    ErrorType = typeof(UnauthorizedAccessException))]
[ClientCallableExceptionConstraintAttribute(FixedId = "viewdne1", Condition = "View does not exist.", 
    ErrorType = typeof(InvalidOperationException))]
[ClientCallableExceptionConstraintAttribute(FixedId = "viewdne2", Condition = "View does not exist.", 
    ErrorType = typeof(DirectoryNotFoundException))]
[ClientCallableExceptionConstraintAttribute(FixedId = "doclocked", ErrorCode = , Condition = "The view is currently checked out or locked for editing by another user.", 
    ErrorType = typeof(SPException))]
[ClientCallableExceptionConstraintAttribute(FixedId = "webnoquota", ErrorCode = , Condition = "Your changes could not be saved because this SharePoint Web site has exceeded the storage quota limit.", 
    ErrorType = typeof(SPException))]
[ClientCallableExceptionConstraintAttribute(FixedId = "weblocked", ErrorCode = , Condition = "Additions to this Web site have been blocked.", 
    ErrorType = typeof(SPException))]
public void Update()

Exceptions

Exception Condition
InvalidOperationException

The view does not exist in the database.

Remarks

Call this method to save the changes in the SPView object to the database.

See Also

Reference

SPView Class

SPView Members

Microsoft.SharePoint Namespace