Used to check-in a file in a document library.


bool CHECKIN(string listName, string file, string comment, int checkInType);

comment: Check-in comments.

checkInType: Integer value indicating the check-in method used. Valid values are: 0 = MinorCheckIn, 1 = MajorCheckIn, and 2 = OverwriteCheckIn.

Return value

The procedure returns true if operation succeeds, otherwise false.

Example: to check-in a major revision of the file named helloworld.txt in document library Shared Documents:

CALL CHECKIN('Shared Documents', 'helloworld.txt', 'Full revision', 1);

Code examples

Check-in document

using (var connection = new SharePointConnection(connectionString))
    using (var command = new SharePointCommand(@"CALL CHECKIN('Shared Documents', 'helloworld.txt', 'Full revision', 1)", connection))
        var ret = (bool)command.ExecuteScalar();

        if (ret)
            Console.WriteLine("Check-in succeeded");
            Console.WriteLine("Check-out failed");

Code result

Check-in succeeded

Skip Navigation Links.

Visa     MasterCard