FTP

 Show all Hide all

It is recommended to use the File manager component in FTP mode instead.

SQL

SQL Call: Connection details (mandatory)

Sql to retrieve connections details.

This call is repeated (after processing the commands of the previous call) until it returns zero rows.

As a precaution it will also terminate if it finds the same same action and server columns as the last call in the resultset.

May modify database: No

Parameters:

@connectiondetails int
This parameter is incremented once every time this call is made. For the first call it is set to '1'.

Resultset: Connection details

Resultset with connectiondetails.
Repeat mode: repeated exactly once
Row count: exactly one row

Columns:

action mandatory string
Specifies what to do with the ftp connection.
Possible value Description
Download Files will be downloaded.
List Retrieve list of files.
Upload Files will be uploaded.
serverurl mandatory string
Url to the FTP server.
transfermode mandatory string
Specifies the transfer mode to use to connect.
Possible value Description
Active Active transfer mode (PORT) will be used.
Passive Passive transfer mode (PASV) will be used.
username mandatory string
Username for the connection. Some FTP-servers have problems using special characters. Because of that it is recommended that the username does not contain such characters.
password mandatory string
Password for the connection. Some FTP-servers have problems using special characters. Because of that it is recommended that the password does not contain such characters.
protocol optional string
Protocol used for communicating with the server.
Default: If ommited then FTP is used as default.
Possible value Description
FTP FTP (not encrypted).
FTPS FTP with TLS/SSL encryption (using the explicit method, if the server uses the implicit method or does not honor the request for encyption, then the component aborts the connection)
port optional int
Remote port used when establishing the connection to the server.
Default: If omitted then port 21 is used as default.
remotepath optional string
Initial path on the remote server.

SQL Call: Specify files

Statement to extract information about files being transferred. Different resultsets are expected depending on if action is upload/download or if local source is disk/db.

May modify database: No

Parameters:

@action string
Possible value Description
Download
Upload

Resultset: Download files (optional)

Information about the files to download.
Repeat mode: repeated zero or one time
Row count: zero or more rows

Columns:

procedure optional string
the procedure which should be called for inserting the files being downloaded.
sourcefile mandatory string
the filename at the remote source - can contain wildcards (*).
targetdirectory optional string
the target directory in the filesystem.

Resultset: Upload files (optional)

The files to upload. The targetfile column must come before the sourcefile column.
Repeat mode: repeated zero or one time
Row count: zero or more rows

Columns:

sourcefile mandatory string
can be a target in the filesystem or an column or type image which containes the file being uploaded. Can contain wildcards.
targetfile mandatory string
the name or the file at the remote source. Will be ignored when wildcards are being used.

SQL Call: Store / enumerate file

Call made when a file is downloaded and no local file path is specified. If you specify a procedure column in the 'Download files' resultset that procedure will be used instead of the regular sql.

May modify database: Yes

Parameters:

@action string
The action being performed. For backwards compatibility reasons, it is only set for "List" and not for "Download".
Possible value Description
List The file is being enumerated. (@file is not supplied)
@file binary
Contains the file which was downloaded.
@filecontentsize int
Contains the size of the file.
@filename string
Contains the filename.

SQL Call: Validate parameters

Allows you to validate the parameters supplied by the user before any other SQL is run in the component. This call is only made if the component has visible parameters, the SQL is a stored procedure, and 'Validate parameters' is checked.

May modify database: No

Parameters:

@Force bit
Set to 1 if the last call to validate parameters used admin_force and the user clicked OK in the OK/Cancel dialog.
@ValidateParams bit
Set to 1 when this call is made.

Custom access control and logging

SQL Call: Custom access control and logging

Use this call to restrict which entries a user is allowed to view and edit, and to log which entries a user views.

Access to a menu item is normally controlled through functions and roles alone but some entities need more fine grained control. For example, a user may have access to the View Member menu item for normal members but not for members with a protected identity.

The menu items a user visits are always logged (in ADMINLogMenuItem) but for sensitive data you may need to log exactly what entries are viewed. Do the logging in this call as the common ways of viewing data (grid and InfoSQL) are not allowed to modify the database.

If you bind a scalar function instead of a stored procedure to this call then its name must end with '_GrantAccess'.

May modify database: Yes

Resultset: Access permissions

Return whether the user is allowed to visit the menu item with the current parameters.
Repeat mode: repeated exactly once
Row count: exactly one row

Columns:

GrantAccess mandatory bit
1 if the user is allowed to view the menu item, 0 if the user should not be allowed to view the menu item.

If 0 then an error will be logged as the user should not have been able to reach the menu item with the given parameters in the first place.