To handle batch import of attachments from a file system to the DB use the stored procedure glb_ImportFilesFromFileSystem.
Usage examples:
--Load all files from specified folder to the Contact attachments and link to the specified @RecordId. DECLARE @TableName NVARCHAR(100) = N'Contact'; DECLARE @LinkColumnName NVARCHAR(100) = N'ContactId'; DECLARE @FolderPath NVARCHAR(500) = N'D:\Data\Files'; DECLARE @RecordId UNIQUEIDENTIFIER = 'C4ED336C-3E9B-40FE-8B82-5632476472B4'; -- Id of some Contact EXEC [glb_ImportFilesFromFileSystem] @TableName, @FolderPath, @LinkColumnName, @RecordId; --Load all files from specified folder to the Account attachments and link to the specified @RecordId. DECLARE @TableName NVARCHAR(100) = N'Account'; DECLARE @LinkColumnName NVARCHAR(100) = N'AccountId'; DECLARE @FolderPath NVARCHAR(500) = N'D:\Data\AccountFiles'; DECLARE @RecordId UNIQUEIDENTIFIER = 'E308B781-3C5B-4ECB-89EF-5C1ED4DA488E'; -- Id of some Account
14:25 May 16, 2019
Unfortunately, there is no such out of the box stored procedure, so you are unable to use it. Hope that Tatiana will answer, but at this point please note on out of the box file import functionality.
Best regards,
Alex
Show all comments