Site sponsored by: Idera Try Idera’s new SQL admin toolset
SQL Server Performance

  • Home
  • Articles
  • Forums
  • Tips
  • Quiz
  • FAQ's
  • Blogs
  • Software
  • Books
  • About Us
RSS Feeds
Sign in | Join


Product Reviews

All Reviews
Audit Tools
Backup Tools
Change Management Tools
Clustering Tools
Coding Tools
Design Tools
Diff / Compare Tools
Documentation Tools
Job Management Tools
Log Recovery Tools
Monitoring Tools
Remote Access Tools
Reporting Tools
Security Tools
Testing Tools

Write for Us

Share you SQL Server knowledge with others and raise your profile in the community More...
Latest Articles

Server and Database Auditing in SQL Server 2008
So, you find yourself On-Call
Administrator & Monitoring Change Data Capture in SQL Server 2008 ...
Importance of the Resource Database

More     
 
Latest FAQ's

SQL Server Reporting Server (SSRS) service is failing to start ...
Cannot Start SQL Server Service
Users are able to connect to report manager but not able ...
Errors when SQL Server Snapshot Replication is Running

More     
   
Latest Software Reviews

Spotlight on ApexSQL Doc 2008
ApexSQL Enforce
Embarcadero Change Manager
SQL Server DBA Dashboard

More     

reviews >> coding tools >> SqlAnswersMail is the Answer to Sending E-mail ...

SqlAnswersMail is the Answer to Sending E-mail in Text, HTML or PDF using SQL Server

By : Dinesh Asanka
Sep 13, 2005

Page 2 / 3

When choosing to produce a PDF document, you can configure a number of different properties, such as page width, length, orientation, page header, page footer, etc. There is a XML file, called defaultPDF.xml (see below), which is used to change the necessary parameters to fit the needs of your PDF documents.

For example, the following query will generate an e-mail with a PDF attachment.

exec sp_SendSAM
@subject='PDF for Order Listl',
@recipients='dineshasanka@gmail.com',
@message='Please find the order list which is attached here with’,
@attachment_format='PDF',
@attach_results='true',
@pdf_definition='//doc/@sizetocontent=1',
@query='select * from Northwind..Orders'

Following is the attachment of PDF which was received from the SqlAnswersMail.

For those people who are using xp_sendmail, it’s very easy to migrate from xp_sendmail to SqlAnswersMail. In most cases, a simple find/replace action is usually all you need to start using SqlAnswersMail in place of xp_sendmail.

Another function that is available with the tool is generating PDF documents for other uses. You just need to copy and paste the result into a test file and save it into a PDF file extension, then you will get a PDF file. The following script will generate PDF files.

exec sp_SendSAM
@query='select top 100 CustomerID, OrderDate,
ShippedDate, Freight, Shipname, ShipRegion
from Northwind..Orders
/*<title>Northeast Orders</title>*/',
@call_mode='STRING',
@format='PDF'

You can call the sp_SendSAM stored procedure from ADO and ADO.net, if desired.

 

Performance

The solution consists of a stored procedure, a COM file, and an EXE file that runs out-of-process and does not interfere with the core workings of the SQL Server, and thus will not decrease the current performance of the SQL Server.

 

Support

E-mail is the prime method of support. A “Getting Started Guide,” along with the included SqlAnswersMail help file, is all you need to get started.


<< Prev Page     Next Page>>    








Home | Peformance Articles | Audit Articles | Business Intelligence Articles | Clustering Articles | Developer Articles | Reporting Services Articles | DBA Articles | ASP.NET / ADO.NET Articles | DBA FAQ's | Developer Peformance FAQ's | DBA Peformance FAQ's | Developer FAQ's | Clustering FAQ's | Error Messages | Audit Tool Reviews | Backup Tool Reviews | Coding Tool Reviews | Compare Tool Reviews | Documentation Tool Reviews | Design Tool Reviews | Monitoring Tool Reviews | Log Tool Reviews | Reporting Tool Reviews | Clustering Tool Reviews | Security Tool Reviews | Change Management Tool Reviews | Remote Access Tool Reviews | Book Reviews | Security Tool Reviews | QDPMA Performance Tuning | ADO.NET / ASP.NET | Administration | Analysis/OLAP Services | Application Development | Configuration | Components | ETL | Hardware | High Availability | Hints | Index | Misc | Operating Systems | Performance Tuning | Replication | T-SQL | Views


              © 1999-2008 by T10 Media. All rights reserved