JDBC Driver for Microsoft SharePoint

Build 22.0.8462

UploadDocument

Upload a document to the SharePoint library.

Note: This procedure makes use of indexed parameters. These input parameters are denoted with a '#' character at the end of their names.

Indexed parameters facilitate providing multiple instances a single parameter as inputs for the procedure.

Suppose there is an input parameter named Param#. Input multiple instances of an indexed parameter like this:

EXEC ProcedureName Param#1 = "value1", Param#2 = "value2", Param#3 = "value3"

Input

Name Type Accepts Input Streams Description
File String False The path of the file to be added.
FileContent String False Base64 encoded content of the file to be added. If specified, the value of 'File' input will be ignored.
Library String False The URL of the directory you would like to upload file(s) to, relative to the base Url supplied in the driver's connection properties.

For example:
Root directory: Shared Documents

If you set the Url connection property to a site collection, the relative URL will correspond with a path on the base site.
If the Url connection property points to a specific site, the relative URL will be relative to the site supplied in the Url.
Name String False The name assigned to the new file.

If uploading to the root directory of the site, supply only the filename.
If uploading to a folder nested at some level inside the root directory, prepend the full parent subdirectory.

For example:
Root Directory: filename.txt
Sub-directory:MyFolder/filename.txt
Content String True The content as InputStream to be uploaded when File is not specified.
ReturnID String False Boolean value indicating whether to return the ID and other metadata fields of the newly created record. An extra API request is needed to get this value.

The default value is false.

MetadataName# String False The name of a metadata field to be set for the document. It must be the column name present in the table of library.
MetadataValue# String False The value of a metadata field to be set for the document.

Result Set Columns

Name Type Description
Result String Boolean value indicating whether the stored procedure was successful.
ID String The internal ID of the document.
_dlc_DocId String The document ID.
_dlc_DocIdUrl String The URL of the document ID.
Vti_author String The creator of the document.
Vti_etag String The e-tag of the document.
FileRef String The file reference of the document.

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462