API CreateDownloadFile: Porovnání verzí
Z Podpora.nextis.cz
(Založena nová stránka s textem „==== Description ==== Method allows You to create new download file in system. ==== Exact name ==== <code>API_CreateDownloadFile</code> ==== Type ==== St…“) |
|||
(Není zobrazena jedna mezilehlá verze od stejného uživatele.) | |||
Řádka 16: | Řádka 16: | ||
!Relation | !Relation | ||
|- | |- | ||
− | |@ | + | |@ValidFromDate |
+ | |datetime | ||
+ | | | ||
+ | |Valid from date | ||
+ | | | ||
+ | |- | ||
+ | |@ValidToDate | ||
+ | |datetime | ||
+ | | | ||
+ | |Valid to date | ||
+ | | | ||
+ | |- | ||
+ | |@GroupName | ||
+ | |nvarchar(200) | ||
+ | | | ||
+ | |Group name | ||
+ | | | ||
+ | |- | ||
+ | |@Title | ||
+ | |nvarchar(200) | ||
+ | | | ||
+ | |Title | ||
+ | | | ||
+ | |- | ||
+ | |@Description | ||
+ | |nvarchar(2000) | ||
+ | | | ||
+ | |Description | ||
+ | | | ||
+ | |- | ||
+ | |@FileName | ||
+ | |nvarchar(255) | ||
+ | | | ||
+ | |File name | ||
+ | | | ||
+ | |- | ||
+ | |@SortIndex | ||
|int | |int | ||
| | | | ||
− | | | + | |Sort index |
− | | | + | | |
+ | |- | ||
+ | |@FILEDATA | ||
+ | |varbinary(max) | ||
+ | | | ||
+ | |File data | ||
+ | | | ||
|} | |} | ||
+ | |||
+ | ==== Return ==== | ||
+ | 0 : OK | ||
+ | 100 : Item could not be created | ||
==== Example ==== | ==== Example ==== | ||
<syntaxhighlight lang="sql"> | <syntaxhighlight lang="sql"> | ||
− | + | DECLARE @return_value int | |
+ | Declare @fILE AS VARBINARY(MAX) | ||
+ | Select @fILE = CAST(bulkcolumn AS VARBINARY(MAX)) | ||
+ | FROM OPENROWSET( | ||
+ | BULK | ||
+ | 'C:\test.pdf', | ||
+ | SINGLE_BLOB ) AS x | ||
+ | |||
+ | EXEC @return_value = [API_CreateDownloadFile] @ValidFromDate = null ,@ValidToDate = null ,@GroupName= 'GroupName' ,@Title= 'Title' ,@Description= 'Description' ,@FileName= 'test.pdf' ,@SortIndex= 0 ,@FILEDATA= @fILE | ||
+ | |||
</syntaxhighlight> | </syntaxhighlight> | ||
==== Notices ==== | ==== Notices ==== | ||
None. | None. |
Aktuální verze z 21. 9. 2017, 11:55
Description
Method allows You to create new download file in system.
Exact name
API_CreateDownloadFile
Type
Standard executable stored procedure.
Specification
Parameter | Data type | Value range | Description | Relation |
---|---|---|---|---|
@ValidFromDate | datetime | Valid from date | ||
@ValidToDate | datetime | Valid to date | ||
@GroupName | nvarchar(200) | Group name | ||
@Title | nvarchar(200) | Title | ||
@Description | nvarchar(2000) | Description | ||
@FileName | nvarchar(255) | File name | ||
@SortIndex | int | Sort index | ||
@FILEDATA | varbinary(max) | File data |
Return
0 : OK 100 : Item could not be created
Example
DECLARE @return_value int
Declare @fILE AS VARBINARY(MAX)
Select @fILE = CAST(bulkcolumn AS VARBINARY(MAX))
FROM OPENROWSET(
BULK
'C:\test.pdf',
SINGLE_BLOB ) AS x
EXEC @return_value = [API_CreateDownloadFile] @ValidFromDate = null ,@ValidToDate = null ,@GroupName= 'GroupName' ,@Title= 'Title' ,@Description= 'Description' ,@FileName= 'test.pdf' ,@SortIndex= 0 ,@FILEDATA= @fILE
Notices
None.