DBtoWEB Version 1.3 Documentation
1. DBtoWEB Settings...
1.1 Specifying a Data Source (wizard
step 1)
1.2 Specifying the Main Table (wizard
step 2)
1.3 Specifying the Template and Generated Fields
(wizard step 3)
1.4 Generating the Pages
1.5 Saving your Settings
2. Running DBtoWEB Unattended
3. Templates Tags...
3.1 Including data from the main table
MAIN_FIELD
3.2 Tags for creating a repeating section
REPEAT
REPEAT_FIELD
REPEAT ELSE
END REPEAT
3.3 Tags for conditional output
START IF
ELSE
END IF
3.4 Including the date of page generation
TODAYS
DATE
1. DBtoWEB
Settings...
1.1 Specifying your Data Source (wizard step 1)
Once you have your template and database ready, run DBtoWEB. You first need
to specify the data source you want to use. You can either choose an MS Access
database or an ODBC data source (do not use an MS Access database via ODBC... there are
known problems about using this method).
1) MS Access Database - enter the full path and filename of the database
2) ODBC DSN - enter the name of the data source configured in ODBC admin tool
After selecting the database press a connecton will be made to the database.
If there is a problem opening the database you'll recieve an error, otherwise you'll be
able to specify the main table.
1.2 Specifying the
Main Table (wizard step 2)
You now choose whether you want to use a table, query or SQL statement where each row in
the recordset contains a template name and generated page name. Once you have chosen
this the template and generated field lists will be populated from fields in the main
table you specified.
1.3 Specifying
the Template and Generated Fields (wizard step 3)
The fields containing the template name and generated page name must now be selected from
the lists of database fields. If the template/generated page names do not include a
path to the files, you must specify them.
If you are using the wizard you can now press 'Finish' to transfer your settings to
the main screen.
Note: If there is no path specified either here or in the database,
DBtoWEB will fail to generate any pages.
1.4 Generating the
Pages
Once you have entered all the settings you need (status bar at the bottom of the screen
will read 'Query Ready to Run') you can generate the web pages by either pressing F5 or by
selecting 'Run' and 'Generate' from the menu.
As the pages are generated you'll see the status message change giving an
indication of its progress through your database (if your database is relatively small
you'll probably no see much before the completion message).
Any problems encountered in generating the pages will be reported in the errors
area of the screen.
1.5 Saving your
Settings
You can now save your settings to a file and re-load them next time you want to generate
your pages.
2. Running DBtoWEB Unattended
If you have saved your settings to a file you can run DBtoWEB from the command line
in the following way:
<path to dbtoweb>\dbtoweb.exe /auto<path to settings file>\<settings file>.d2w
e.g.
c:\program files\dbtoweb\dbtoweb.exe /autoc:\project\gen\mysettings.d2w
When you run DBtoWEB like this it will load the settings file, run the page
generate operation, then exit. This could be very useful where you have data that
needs exporting every evening to keep your web pages up-to-date since you can use a
program like Win-AT (in the Microsoft NT Resource Kit) to execute this command at a
specified time every day.
3. Template Tags
The templates which DBtoWEB read are plain text files, they don't even need to
contain any HTML so there are many more uses for this utility.
When DBtoWEB processes a template it is looking for tags. These tags take the
form of HTML comments, eg. <!--TAG NAME-->. DBtoWEB supports the
following set of tags:
3.1 Including data from the main table
3.2 Tags for creating a repeating section
<!--END REPEAT--> | This tells DBtoWEB to end the repeating section |
3.3 Tags for conditional output
<!--END IF--> | DBtoWEB 1.2 Professional Feature Marks the end of an IF section. |
3.4 Including the date of page generation
<!--TODAYS DATE=date--> | Inserts todays date in the format specified. A complete listing of the date formats available is on a separate page together with examples. |
e.g. <!--TODAYS
DATE=d mmmm yyyy--> Would be replaced with todays date, e.g. '30 January 1999' |