ColdFusion Code Sample

The following sample code uses the Data Source that was created earlier in ColdFusion via the Administrator console.

The actual script is:

<html>
<head>
<title>A ColdFusion Page</title>
</head>
<body>
This is a ColdFusion page.
<br />
<cfquery name="DBSINFO" datasource="TeraJDBC4">
   select InfoKey, InfoData from dbc.dbcinfo
</cfquery>
<cfoutput query="DBSINFO">
#InfoKey#, #InfoData#<br />
</cfoutput>
</body>
</html>

When this script is put into a file C:\CFusionMX\wwwroot\test.cfm

then it can be invoked from a browser via an URL http://localhost:8500/test.cfm

and will produce output similar to the following:

This is a ColdFusion page.
VERSION, 06.00.00.00
RELEASE, V2R.06.00.00.00