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)
 Web assistant

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-07-05 : 10:55:03
Robert writes "I have used the SQL web assistant to create a static index.htm page. The page is created hourly. Everything works great when I am not creating the live index file. If for instance, I build the file home.htm, I have no problem. The new page is created every hour. But when i try to do the same with the live index.htm page, it fails. Why is this? It is making me crazy because it is the ideal solution for me. the content of the page doesn't change much and I would love to not use an ASP page to save some resources. Any ideas?"

jasper_smith
SQL Server MVP & SQLTeam MVY

846 Posts

Posted - 2002-07-05 : 11:42:26
Is your page called "live index.htm" or "index.htm" ?
You probably don't want a space in the name.
If it works whn its called home.htm what's wrong with that ?

HTH
Jasper Smith
Go to Top of Page

M.E.
Aged Yak Warrior

539 Posts

Posted - 2002-07-05 : 11:46:52
spaces in web pages need to be reffered as live%20%index.htm... don't they?

-----------------------
Take my advice, I dare ya
Go to Top of Page

roblasch
Starting Member

10 Posts

Posted - 2002-07-05 : 15:57:25
The page is index.htm. But that being said, I figured it out. After hours of searching, I finally found someone who confirmed that There is a problem with web assistant when browsers are accessing the page as it is being written to. That is why the index.htm page couldn't be written and generated an error. The solution is to write to a different file (in my case home.htm) then copy the file to index.htm using xp_cmdshell. It has been working like a charm, creating a new home page every hour.

Go to Top of Page

KHeon
Posting Yak Master

135 Posts

Posted - 2002-07-08 : 09:07:37
You should be aware of the security ramifications around using xp_cmdshell (or rather, making it available via a web login). If a hacker figured out how to get into your database using the login account you have for your site, they have a lot of power.

My suggestion would be to instead create a simple DTS package that is also scheduled that overwrites the index.htm file with the previously created home.htm file. You can use standard VBScript code inside a DTS package to accomplish this.

Good luck.

Kyle Heon
PixelMEDIA, Inc.
Senior Application Programmer, MCP
kheon@pixelmedia.com
Go to Top of Page
   

- Advertisement -