Home > Archive > MS SQL Server DTS > July 2005 > Generic DTS Package for emailing excel









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Generic DTS Package for emailing excel
blarfoc@yahoo.com

2005-07-28, 11:36 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.

Douglas Laudenschlager [MS]

2005-07-28, 1:39 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/defaul...b;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@yahoo.com> wrote in message
news:1122566042.182770.280400@g14g2000cwa.googlegroups.com...
> 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.
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com