automatically generating an HTML file from an ASP

Results 1 to 3 of 3

Thread: automatically generating an HTML file from an ASP

  1. #1
    Join Date
    Dec 1969

    Default automatically generating an HTML file from an ASP

    I have an ASP application that displays an event schedule for a touring band. the schedule is kept in an Access database and when a user accesses the schedule page, it queries the database and displays the latest schedule, leaving out any events that have already passed. sounds simple enough and this works very well. <BR><BR>I am wondering if anyone knows if its possible to write a script that would automatically (each day at a specified time) write a static HTML file based off of the query. My reasoning for this is to reduce the number hits on the database, and to always have the schedule assessible on the website, even if something on the server crashes that would prevent ASP applications from running (the later is my main issue that I&#039;m dealing with).<BR><BR>Am I way off base here? Or is this possible?<BR><BR>Thanks!<BR>Ryan <BR>

  2. #2
    Join Date
    Dec 1969

    Default Not really advanced but what the heck...

    Start with creating the file:<BR><BR><BR>Then onto scheduling:<BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: automatically generating an HTML file from an

    Its pretty simple.<BR>write a vb exe and put it in the scheduler . Inside the vb code build the html page <BR><BR>you can use the simple vb file write <BR><BR>check the following code <BR>===========================<BR>Dim iFileNumber As Integer<BR><BR>iFileNumber = FreeFile<BR><BR>&#039;If the file is not there, one will be created<BR>&#039;If the file does exist, this one will<BR>&#039;overwrite it.<BR><BR>Open "C:MyFile.htm" For Output As iFileNumber<BR><BR>Print #iFileNum, "&#060;HTML&#062;&#060;BODY&#062;"<BR><BR>Prin t #iFileNum, "Write the body text here "<BR><BR>&#039;You can iterate through the result set and print in <BR>&#039;the file here if you are <BR>&#039;getting data from database <BR><BR>Print #iFileNum, "&#060;/BODY&#062;&#060;/HTML&#062;"<BR><BR>Close iFileNum<BR><BR>Hope this helps

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts