HomeHelpSite indexFeedbackSearch
Yenza!

Building a website

Developing a website
General discussion
of site


Learning HTML

Planning and building

Going live

HTML editors

Web
development
resources


Ongoing skills
development


Web databases
Cold Fusion
Example

Learn to use the Internet

Start your research

Yenza! for trainers

The Internet for training

Subject links
Taking databases online

Cold Fusion/MS Access Example: NRF Women-in-Research Database (by Simone Shall, SANGONeT)

The National Research Foundation's Women-in-Research database, developed in MS Access, was taken online using Cold Fusion: http://www.nrf.ac.za/wir/wirdbase.htm


Cold fusion basics

Cold Fusion is an application development system for creating dynamic Web applications and interactive Web sites. Instead of just using HTML to build sites, standard HTML is combined with Cold Fusion Markup Language (CFML) code.

There are three components involved in developing and running Cold Fusion applications:

Cold Fusion Server: The Cold Fusion server runs under Windows NT – it listens for requests from the standard Web server to process Cold Fusion application pages.

Application Pages: These are the pages which include user interface pages, forms that handle data input and format data output. They can include HTML, CFML, Java scripts and anything else normally put into an HTML page.

ODBC Data source: The database set up needs to be declared as an ODBC data source and then interacts with the Cold Fusion server.


Women-in-Research Database: Behind the Scenes  

  • The National Research Foundation created the Women-in-Research database in MS Access, and uploaded it to the SANGONeT server. 

  • SANGONeT declared the Women-in-Research database as an ODBC source.

  • SANGONeT developed the application pages to access and display the information contained in the MS Access database. The application pages are hosted on the Cold Fusion server. Components include a search module, display module, new entry module and amend module.

Women researchers submit their details to the database via a form on the SANGONeT web site - the "new entry" module:
http://paradigm.wn.apc.org/hsrc/entryform.cfm

This information is written directly to the database on the SANGONeT server. The NRF is still responsible for the data and data integrity, however, and a copy of each new entry is e-mailed to the NRF, where it is checked. If there is a problem with a new entry, it can be deleted or modified, or the NRF can contact the person who submitted the information.

By entering a password and user name, people are able to update their existing records. 

Users can search the database by surname, discipline, institution or research interests: http://www2.wn.apc.org/hsrc/search.cfm

All the above features, excepting for the email message (CFMAIL) are all supported by Cold Fusion Express, the free version of Cold Fusion.

Display module

The table which follows shows the display module for the Women-in-Research database, which displays the results of the search query.

All comments are indicated by <!--- and explain what is happening.

In this module the <CFTABLE> tag is used but it is not necessary and can be handled by the normal <TABLE> command and the <CFOUTPUT> commands.

Comments are indicated in green and Cold Fusion components in blue.

<!---This Cold Fusion Template is responsible for the display of the Results Page. It uses fields passed from the Search Page to run a query against the database and retrieves the fields displayed on this page. --->

<!---Run the query using fields entered in the previous page.--->

<CFQUERY NAME="GetResults" DATASOURCE="WOMEN3">
SELECT Directory.First_Name,Directory.Surname,Directory.
Discipline,Directory.Institution,Directory.e_mail,
Directory.ID
FROM Directory
WHERE 0=0

<CFIF #Directory__Surname# IS NOT "">
AND Directory.Surname LIKE '%#Directory__Surname#%'
</CFIF>

<CFIF #Directory__Discipline# IS NOT "">
AND Directory.Discipline LIKE '%#Directory__Discipline#%'
</CFIF>

<CFIF #Directory__Institution# IS NOT "">
AND Directory.Institution LIKE '%#Directory__Institution#%'
</CFIF>

<CFIF #Directory__Research_interests# IS NOT "">
AND Directory.Research_interests LIKE '%#Directory__Research_interests#%'

</CFIF>

ORDER BY Directory.Surname ASC

</CFQUERY>

<!---Now assemble the HTML of the Results Page --->

<HTML>
<HEAD><TITLE>Women in research</TITLE></HEAD>
<BODY bgcolor="#ffffff">

<table>
<tr>
<td>
<a href="http://www.nrf.ac.za/wir/wirdbase.htm">
<img src="pix/nrfcolor.gif" width=141 height=82 alt="" border="0"></a>
</td>

<td><font face="Arial" color="#003366">
<H1>Women-in-research query results</H1>
</font>
</td>
</tr>
</table>

<CFOUTPUT><B>Number of records matching your query:</B> #GetResults.RecordCount#
</CFOUTPUT>

<!---You can enter your own HTML here if you would like to customize the look of the Results Page--->

<!---Display result data from the database.--->

<CFTABLE QUERY="GetResults">

<CFCOL HEADER="Surname" WIDTH="10" TEXT="<A HREF=""Detail.CFM?Directory__ID=#ID#"">#Surname#</A>">

<CFCOL HEADER="Discipline" WIDTH="20" TEXT="<HREF=Directory__Discipline>#Discipline#">

<CFCOL HEADER="Institution" WIDTH="30" TEXT="<A HREF=""Detail.CFM?Directory__ID=#ID#"">#Institution#</A>">

<CFCOL HEADER="Email" WIDTH="30" TEXT="<A HREF=""mailto:#e_mail#"">#e_mail#</A>">

</CFTABLE>

<!---Inform user that no results were retrieved if no records found--->

<CFIF #GetResults.RecordCount# IS 0>

<H2>No records were found matching your criteria</H2>

<P>Please press the BACK button and try again.

</CFIF>

<hr width="65%" color="#0000FF">

<!--- Display the navigation bar at the end of the page>

<p>
<table>
<tr>
<td>
<p>&nbsp;&nbsp;
<p><a href="entryform.CFM">
<img src="pix/dataentr.gif" width=77 height=54 alt="Data entry form" border="0"></a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<a href="http://www.nrf.ac.za/wir/help.htm">
<img src="pix/help.gif" width=77 height=54 alt="H E L P!" border="0">
</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<a href="search4.CFM"><img src="pix/srcheye.gif" width=77 height=54 alt="search the database" border="0"></a>

</td></tr>
</table>

<hr>
<table border="0" cellpadding="0">
<tr>
<td valign="top" width="80%"><font size="2"><strong>Please send
e-mail to </strong></font>
<a href="mailto:simone@sn.apc.org"> 
<font size="2"><strong>
<!--webbot bot="Substitution" s-variable="CompanyAcronym" startspan -->S U P P O R T<!--webbot bot="Substitution" endspan i-checksum="8101" --></strong></font></a><font size="2"><strong>
with any comments on this site<br
<br>
</font></td>

<td align="right">
<img src="pix/sangotxt.gif" width=264 height=24 alt="" border="0">
<br>

<a href="http://www.sn.apc.org/"><img src="pix/sango.gif" width=39 height=33 alt="" border="0"></a>
</td></tr>
</table>
</BODY>
</HTML>

 

Why Cold Fusion?

SANGONeT chose Cold Fusion because;

  • it’s a relatively simple but very powerful program
  • it performs all the functions we need to make databases online
  • it does not have a restriction on the number of users allowed to access a database at any given time
  • most of the databases we put online are relatively simple flat databases.

 

 
Top of the Page

Questions? Comments? Contact the site administrator.