User Guide

Chapter 4: Managing Data Sources 121
you need to create the newtable data source in the ColdFusion Administrator,
specifying the MERANT dBase/FoxPro ODBC driver. If you dont create the data source,
you’ll receive an error when you try to execute this page. This example generates the
following tables in the newtable data source.
<HTML>
<HEAD>
<TITLE>DBASE Table Setup</TITLE>
</HEAD>
<BODY>
<!---
Before running this code, you need to create the
newtable data source in the ColdFusion Administrator,
specifying the Merant dBase/FoxPro ODBC driver.
--->
<CFQUERY NAME=xs DATASOURCE="newtable">
CREATE TABLE Beans1 (
Bean_ID numeric(6),
Name char(50),
Price char(50),
Date date,</P>
Descript char(254))
</CFQUERY>
<CFQUERY NAME=xs DATASOURCE="newtable">
INSERT INTO Beans1 VALUES (
1,</P>
’Kenya’,
’33’,
{ts ’1999-08-01 00:00:00.000000’},
’Round, rich roast’)
</CFQUERY>
<CFQUERY NAME=xs DATASOURCE="newtable">
Fields created in the Beans1 table
Field Data type
Bean_ID numeric
Name char
Price char
Date date
Descript char