Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

'Static' webpage based on access database

Status
Not open for further replies.

flaviooooo

Programmer
Joined
Feb 24, 2003
Messages
496
Location
FR
Hey,

I was wondering if this was possible, and how...

I would like to make a webpage that is filled with data from an access database, and then uploaded to the internet. The database can't be edited by the visitors of the site, only by me.
Everytime I would make a change in the database, the webpage changes locally on my harddrive, and I would upload the page again.
Note: my webprovider doesn't allow me to use ASP, but this isn't necessary I think, because the data doesn't have to be edited online?

Thanks
 
falviooooo,

Answer is yes you can create "static" HTML or ASP pages that you can upload.

Since your in the ACCESS OTHER TOPICS one assumes you have MS Access 97 or >. If so, it can save the output in .HTML format.

You could also write VBA in Access to accomplish it.

Or you could use ADO (Activex Data Objects), coupled with FileSystemObject (FSO) and VBScript to write to a folder and filename of your choosing, pure HTML or even embed Clientside scripting (javascript or VBScript.)

The following two references show how this can be done within ASP on a server, but realistically, not much difference between it and doing it from a cscript/WSH.

Access To HTML

Create HTML Pages from Access Db

Using the WSH on the Desktop
(Note, this includes emailing a copy of the doc, but shows how to create sample HTML doc based on an Access DB. Only piece missing is using FSO to write the data to a file.

Hope this helps.
DougCranston
 
-have a template HTML file (with links to other pages and images, but without data from the database)
-insert some 'markers' of your choice into the HTML template
-read the HTML line by line (with Open For Input)
-if no marker, just transfer the entire line to the 'output' file
-if a marker is found, run the appropriate code to insert data from the database: open a recordset, start a <table> tag, start a <tr> tag, move through the fields of the recordset and write data with <td> tags. You can insert graphics, hyperlinks and any bells and whistles you want, and the web page will look exactly like you want it.
-upload the generated file to the server. You can use the INET control or wininet.dll called through API - check for code to accomplish that.

Another way to upload the file would be to create a batch file and shell FTP, but this doesn't give you much control over error.

Good luck


[pipe]
Daniel Vlas
Systems Consultant

 
Hey guys, thanks for the response.
Danvlas, your solution seems the most simple to accomplish, but frankly I don't understand it.
I'm a complete newbie at this:

-What do you mean by 'markers'? Is it the same as editionable zones in a template from Dreamweaver?
- What's 'Open For Input'. Is this feature available in Dreamweaver?

Perhaps you have a little example of this all, so things can become clearer to me?
Thanks in advance!

Greetz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top