how i sp_send_dbmail send calm varbinary column?
i have files stored sql server 2005 list varbinary(max) column. i need email files users schedule, nonetheless i c# use mislay send email sp_send_dbmail seem ideal purpose. formula i'm controlling looks this:
exec msdb.dbo.sp_send_dbmail
@profile_name = 'sql mail profile',
@recipients = 'emailaddress',
@query = 'set nocount on; name cast(content varchar(max)) files where fileid=''xxx''' ,
@subject = 'random file',
@attach_query_result_as_file = 1,
@query_attachment_filename = 'random file.pdf',
@query_result_no_padding = 1,
@query_result_header = 0,
@query_no_truncate = 1;
when i query directly i calm illustration pdf record out, nonetheless i formula above i truncated chronicle record (always 792 bytes). seem advise there sourroundings somewhere controls this, nonetheless nonetheless i settings control request distance proceed bigger record i'm perplexing mail!
anyone seen before, have any ideas where look?
Comments
Post a Comment