Share via


Checkin Method

The Checkin method checks in the current document. A check-in releases the editing reservation placed on the document when it was checked out and updates the content of the document.

Function Checkin( _varUrlsAs Variant, _
    [flagsAs Long], _
    [varCheckinCommentAs Variant] _)As _Recordset[C++]
HRESULT Checkin(
VARIANTvarUrls,
    LONGflags, 
    VARIANTvarCheckinComment,
    _Recordset**ppResultsSet);

[Visual Basic]

Parameters
  • varUrls
    Variant that contains an array of Variants. Each Variant in the array contains a String that contains the URL of a document. Only one document can be specified.
  • flags
    Long that contains the bit mask that indicates whether to use ServerXMLHTTP or WININET to send the request. See EnumKnowledge_VersioningFlags for possible values.
  • varCheckinComment
    Variant that contains the comment to be applied to this version of the document. The property is optional. Defaults to an empty string.
Return Values

This method returns an ActiveX Data Objects (ADO) recordset that contains the new version. All recordsets returned by PKMCDO have RecordCount equal to -1. Instead of relying on the count, call MoveNext in a loop that checks for Recordset.EOF. For information about the format of the returned recordset, see Recordset Format.

Error Values

If an error is raised, Err.Number is set to one of the values documented on the Error Messages page.

[C++]

Parameters
  • varUrls
    [in] VARIANT that contains an array of VARIANTs. Each VARIANT in the array contains a BSTR that contains the URL of a document. Only one document can be specified.
  • flags
    LONG that specifies bit mask that indicates whether to use ServerXMLHTTP or WININET to send the request. See EnumKnowledge_VersioningFlags for possible values.
  • varCheckinComment
    [in, optional] VARIANT that contains the comment to be applied to this version of the document. Defaults to an empty string.
  • ppResultsSet
    [out, retval] Address of a pointer to an ActiveX Data Objects (ADO) recordset that contains the new version. All recordsets returned by PKMCDO have RecordCount equal to -1. Instead of relying on the count, call MoveNext in a loop that checks for Recordset.EOF. For information about the format of the returned recordset, see Recordset Format.
Return Values

For a list of error messages returned by SharePoint Portal Server, see Error Messages.

Remarks

The Checkin method succeeds only for documents that are not checked in.

Example

To see an example of the version control process, see the example in IKnowledgeVersion interface.

To see this method in a fuller context, see Document Management Object Model Sample.