Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 UNC @outputfile for sp_makewebtask

Author  Topic 

Jay99

468 Posts

Posted - 2000-12-07 : 12:03:29
I am playing around with the web assistant and I am having trouble. My db server and web server are two different machines. I am trying to run sp_makewebtask such that it runs a stored procedure to creates a drop down box which I will #include in an asp. The web task and stored procedure are working. My problem is that I would like the resulting .htm file from the webtask to go into the director on the web server. BOL states:

[@outputfile =] 'outputfile'
Is the location of the generated HTML file on the computer running Microsoft® SQL Server™. It can be a UNC name if the file is to be created on a remote computer. outputfile is nvarchar(255), with no default.


When I execute:
EXECUTE sp_makewebtask
@outputfile = N'\\webserver\dbman\db_drop.htm',
@query=N' DECLARE @bError BIT EXECUTE usp_getDBs @bError OUT',
@templatefile=N'C:\MSSQL7\HTML\DB_drop.tpl',
@dbname=N'DBMan',
@whentype=10,
@datachg=N'TABLE=DBMaster COLUMN=siDBID,vcName,vcServer,vcDescription',
@procname=N'DB_Drop',
@codepage=65001,
@charset=N'utf-8'


I get:
Server: Msg 16821, Level 11, State 1, Line 0
SQL Web Assistant: Could not open the output file.


I can browse to \\webserver\dbman\ so I know the UNC is correct. Any ideas?

TIA,
Jay

jackstow
Posting Yak Master

160 Posts

Posted - 2002-11-19 : 09:25:10
I've just come across exactly the same problem, and the hosting company don't want to change the network setting for the SQL Server box. Anybody got any ideas?

Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-11-19 : 10:17:19
The only thing that comes to mind is to have the webtask output to the server's hard drive and/or some network drive that it CAN access, then use xp_cmdshell to copy the file to the web server (and delete it from the SQL server), or use an ActiveX job step to do it.

Go to Top of Page
   

- Advertisement -