JDBC Driver for Microsoft SharePoint

Build 24.0.9060

DownloadAttachment

Downloads a document from the SharePoint list.

Stored Procedure Specific Information

Insert

RemoteFile can be both relative to the server, or it can be the full URL of the file. Below are some examples:

EXECUTE DownloadAttachment File = 'C:/Users/User/Desktop/DownloadedFile.txt', RemoteFile = 'https://mysite.sharepoint.com/Lists/MyCustomList/Attachments/1/FileToDownload.txt';

EXECUTE DownloadAttachment File = 'C:/Users/User/Desktop/DownloadedFile.txt', RemoteFile = '/Lists/MyCustomList/Attachments/1/FileToDownload.txt';

Input

Name Type Accepts Output Streams Description
File String False The path of the file to be saved.
RemoteFile String False The path of the file on the server. This can be the full URL or simply the file name. If you use the name of the file, the latest version is downloaded.
Encoding String False The data is output to FileData in the specified encoding.

The allowed values are NONE, BASE64.

The default value is BASE64.

FileStream String True The OutputStream to write the downloaded attachment. Only used if File is not provided.
ReadTimeout String False How many seconds the download may run. If given, the download always fails if it runs longer than this, unlike Timeout which only triggers if the download stalls.

Result Set Columns

Name Type Description
Success Boolean Indicates whether the operation was successful or not.
FileData String The downloaded file content. Only returned if File and FileStream is not set.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060