FTP_FileWrite

Writes content to a new file on a remote FTP Server

  • Stored Procedure
  • SQL Server Compatibility: 2008, 2012, 2014, 2016, 2017

Syntax:

EXEC SQLHTTP.net.FTP_FileWrite @URL, [@UserName], [@Password], @FileEncoding, @FileContent, [@StatusCode], [@StatusDescription]

Arguments:

Name Type Description
@URL nvarchar(4000)

Required. FTP address that includes the source file name. 

@UserName nvarchar(200)

Optional. Leave blank (NULL) for anonymous connections 

@Password nvarchar(200)

Optional. Leave blank (NULL) for anonymous connections 

@FileEncoding varchar(100)

Required. Can be of the following: ASCII, BASE64, UNICODE, UTF7, UTF8, UTF32, or any other Code Page or Encoding Name available in the following View: CodePageEncodings. Use BASE64 for all Binary data. 

@FileContent nvarchar(MAX)

Required. File content data to be sent to the remote FTP server. Binary data should be sent as a Base64 string.

@StatusCode int

Optional. Output Parameter. Numeric status of the response.

@StatusDescription nvarchar(MAX) Optional. Output Parameter. Status Description returned with the response.

Sample Usage:

See Also: