Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xp_sendmail breaks field contents (SQL Server)

Status
Not open for further replies.

tvbruwae

Programmer
Aug 9, 2001
224
EU
Hi

I wrote a trigger that activates when a record is added to my MS SQL table. It's purpose is to send a mail to the administrator with some values from the inserted fields in the message.

To send the mail, I'm using xp_sendmail, but I encountered the following problem. One of the fields to be sent contains one or more (long) filenames, preceded with " . What should happen is that the mail is sent with these URL's appearing as a link to the files. Instead however, the strings are broken after a number of characters and the second part of the filename is displayed on another line (which makes the link unusable from Outlook for example).

I know the limitation of 255 characters for the message, so I tried to put these names in a table and send them with a query. This gives the same problem. Sending them as an attachment works, but then the links are no longer clickable (when the attachment is opened in notepad). Increasing the @width to 2000 didn't change anything as well, so I'm out of options myself. Any tips?

Thanks
 
See answer in SQL Server forum. Please avoiod cross posting, particularly to non-related forums. Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions in the SQL Server forum. Many of the ideas apply to all forums.
 
Sorry about the cross-posting, I won't do it again... However, increasing the @width doesn't change anything to the breaking of the URL. Do you have any ideas why?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top