RE: Calling a file from stored procedure

RE: Calling a file from stored procedure

 

  


Mindy,

It may seem convoluted, but you could always run your SQL commands or
bcp utility to put the data into your .xls or .csv locally on the SQL
Server itself. Once your .asp page runs that SQL command or bcp utility
successfully, you could do a response.redirect in your .asp to that file
on the SQL Server.

You might need to setup a virtual directory in IIS to that shared
directory on the SQL Server containing the final outputted file - that
way the file would appear to be on the web server. There may also be
some permissions you would need to setup on that directory to allow IIS
to get to the file(s), but I know that IIS lets you specify what network
user id to use while accessing virtual directories. This is probably
easier than trying to get SQL Server to write to your IIS Server, and
IIS is helpful in letting you use UNC paths to access shares on another
machine. Hope this helps!

-Jon

Jonathan P. Yarema
PC Applications Developer
International Truck & Engine Corp.

-----Original Message-----
From: Mindy Riddick
[mailto:mssqldba-ezmlmshield-x29135183.[Email address protected]
Sent: Monday, November 29, 2004 11:29 AM
To: LazyDBA Discussion
Subject: Calling a file from stored procedure

Hi everyone,

I want my users to be able to click on a link on a .asp page and open
up an .xls file that holds data from the database and gets updated each
time the link is clicked on. I created a batch file that opens and runs
the bcp utility, which automatically gets the data each time the
test.bat file is clicked on.

The issue with my solution is that the bcp utility won't run on my web
server without SQL Server on it and for security reasons, I can't
install a desktop version or any version on it. Does anyone have any
suggestions for a workaround?

Thank you.

Mindy


---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
Website : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
For additional commands, e-mail: mssqldba-[Email address protected]


CONFIDENTIALITY NOTICE

This e-mail and any attachments, as well as any documents from a file server of International Truck
and Engine Corporation or its affiliates, are intended for the addressee and may contain information
that is privileged, confidential, proprietary, or otherwise protected by law. Any dissemination,
distribution, or copying is prohibited. If a confidentiality or nondisclosure agreement exists
between International and the recipient or the recipient's employer, this e-mail and any attachments
hereto, as well as any documents from a file server of International Truck and Engine Corporation or
its affiliates, this notice serves as marking as CONFIDENTIAL information of International Truck and
Engine Corporation or its affiliates. If you have received this communication in error, please
contact the original sender.

MS Sql Server LazyDBA home page