ADO.NET Provider for Microsoft SharePoint

Build 25.0.9539

DiscardCheckOutDocument

Reverts a checked-out document to its last saved state, canceling any unsaved changes. Useful for preventing unintended modifications.

Stored Procedure-Specific Information

The DiscardCheckOutDocument stored procedure discards the checkout of a document, reverting any changes made since the document was checked out. The Library parameter specifies the document library name, and the RemoteFile parameter specifies the path to the document.

To execute this procedure, enter:

EXEC DiscardCheckOutDocument Library = 'Documents', RemoteFile = 'Test Folder 1/Document.txt';

Input

Name Type Required Description
Library String True The name of the SharePoint document library where the file is stored. Example: 'Shared Documents'.
RemoteFile String True The path of the file to discard the checkout for. This can be the full URL (such as 'https://yoursharepointsite.com/Shared Documents/report.docx') or the relative file name within the library.

Result Set Columns

Name Type Description
Success Boolean Indicates whether the checkout was successfully discarded. Returns 'true' if the operation succeeded, otherwise 'false'.

Copyright (c) 2026 CData Software, Inc. - All rights reserved.
Build 25.0.9539