March 2, 2004 at 5:31 am
Peeps,
I am attempting to access html files on the local server to act as templates for email notifications that will be generated and sent via SQL 2000. I've done this before by simply storing the html in a table. However, this makes amending the templates a pain in the backside. What I really want is to be able to refer to actual html files on the server and therefore make amending the templates a lot easier.
So, far I've manged to DTS the file(s) into SQL with row and column delimiters as CRLF and also access the files with a linked server. What I can't figure out is how to access the files through a linked server where the row and column delimiters are correct.
Does anyone have an answer or a suggestion how to better manage this?
CHeers
March 3, 2004 at 10:43 am
Check this stored procedure sp_makewebtask on BOL to build an html template and populate it with the data then use master.dbo.xp_smtp_sendmail stored procedure to send your email as an HTML file. I use these two procedures for building daily reports to be sent to me by email in HTML format.
I hope this will help
Mohamed
March 4, 2004 at 9:15 am
good suggestion and good sp....I've played about with it and its just what I need!!!
But, and there always is a "but"....it falls over if any of the query(s) are distributed.
Can't find any info on this problem.....have you had this problem?
cheers
March 4, 2004 at 9:20 am
Yes I did have the same problem, I use temp tables to store the result then run a query on the temp table. I am not sure about views though, I don't remember if I did use views or not. try it and let me know
Mohamed
March 4, 2004 at 9:32 am
Yep I'm using distributed views.
The only way I can think of to bodge it is by refreshing a local table once a day so the query used to create the html runs local and not remote...not exactly a good solution though...thanks for your suggestion though, it has put me on the right track!
Dan
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply