SoftadminSnippet.DatabaseFileLink

Type: Scalar function

Generates a clickable link for downloading a file.
The Get Database File call for the snippet is triggered when the link is clicked.

Example

DECLARE @LinkGuid uniqueidentifier;
EXEC SoftadminSnippet.DeclareLink
	@LinkGuidOut = @LinkGuid OUTPUT;

SELECT SoftadminSnippet.DatabaseFileLink(@LinkGuid, '<b>Download file</b>', 'File.txt', '050DFB5D-6EB2-4C39-B802-2BCC1399EA2C', NULL) AS Html;

See also

Parameters

@LinkGuid mandatory uniqueidentifier
@Html mandatory nvarchar
@Filename mandatory nvarchar
@FileId mandatory nvarchar
This is the parameter for the "Get Database File" call.
It is strongly recommended to use GUIDs or similar since the value will be part of the URL and can thus be changed.
@CssClass mandatory varchar