yf1022
yf1022
关注数: 0
粉丝数: 3
发帖数: 8
关注贴吧数: 1
SQL Server发送带附件的邮件问题 发送不带附件的邮件没有问题,只要带附件就报错误。 消息 22051,级别 16,状态 1,第 0 行 附件文件 D:\Serial.txt 无效。 DECLARE @itemID INT DECLARE @AttachFile nvarchar(max) SET @AttachFile = 'D:\Serial.txt' EXEC msdb.dbo.sp_send_dbmail @profile_name = 'sp_send_dbmail', @recipients = '
[email protected]
', @body = '查询结果在附件中', @subject = '查询结果', @body_format ='HTML', @mailitem_id = @itemID OUTPUT, @file_attachments = @AttachFile print @itemID
SQL Server发送带附件的邮件问题 发送不带附件的邮件没有问题,只要带附件就报错误。 消息 22051,级别 16,状态 1,第 0 行 附件文件 D:\Serial.txt 无效。 DECLARE @itemID INT DECLARE @AttachFile nvarchar(max) SET @AttachFile = 'D:\Serial.txt' EXEC msdb.dbo.sp_send_dbmail @profile_name = 'sp_send_dbmail', @recipients = '
[email protected]
', @body = '查询结果在附件中', @subject = '查询结果', @body_format ='HTML', @mailitem_id = @itemID OUTPUT, @file_attachments = @AttachFile print @itemID
1
下一页