dbTalk Databases Forums  

Generic DTS Package for emailing excel

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Generic DTS Package for emailing excel in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
blarfoc@yahoo.com
 
Posts: n/a

Default Generic DTS Package for emailing excel - 07-28-2005 , 10:54 AM






Hello, I have a need for a web application to request a stored
procedure to be run and then the results emailed to the user in Excel.
My web applicaiton is in ASP.C#.NET. But I want to use parameters to
supply the

stored procedure name
excel file name
email address

Should I use the DTS designer or should I have my web application build
the DTS package from scratch each time? I think i can't use the
designer window because I don't know the names of the stored procedure
or email address or excel file each time.

Please tell me how is the best way to approach? I don't want to create
a DTS package for each stored procedure because the procedures and
parameters can be different every time.


Reply With Quote
  #2  
Old   
Douglas Laudenschlager [MS]
 
Posts: n/a

Default Re: Generic DTS Package for emailing excel - 07-28-2005 , 12:50 PM






While I'm a big fan of DTS, you may be able to eliminate some complexity by
(1) exporting your data to Excel directly from your stored procedure(s) by
using a SELECT INTO statement, for example, then (2) simply emailing the
file using SMTP from your web app.

Here's one article where you can find an example of the SELECT INTO syntax,
although the context is not a stored procedure:

Q295646 HOWTO: Transfer Data from ADO Data Source to Excel with ADO
http://support.microsoft.com/default...;EN-US;Q295646

-Doug
--
Douglas Laudenschlager
Microsoft SQL Server documentation team
Redmond, Washington, USA

This posting is provided "AS IS" with no warranties, and confers no rights.

<blarfoc (AT) yahoo (DOT) com> wrote

Quote:
Hello, I have a need for a web application to request a stored
procedure to be run and then the results emailed to the user in Excel.
My web applicaiton is in ASP.C#.NET. But I want to use parameters to
supply the

stored procedure name
excel file name
email address

Should I use the DTS designer or should I have my web application build
the DTS package from scratch each time? I think i can't use the
designer window because I don't know the names of the stored procedure
or email address or excel file each time.

Please tell me how is the best way to approach? I don't want to create
a DTS package for each stored procedure because the procedures and
parameters can be different every time.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.