Many of the tutorials in the Flex and ColdFusion mini learning center use the same sample database with employee sales information for the Fictitious Sales Planner. In this section you set up the HSQLDB database engine and sample database, and create the ColdFusion data source.
Note: The following setup instructions assume that you have a local, standalone installation of the Developer's Edition of ColdFusion 8 Professional
The following step show you how to set up the open source, lightweight HyperSQL Database (HSQLDB) engine.
We have chosen to use HSQLDB because it is easy to set up for use with a local ColdFusion environment and does not require additional downloads beyond the student files that accompany this tutorial:
The HSQLDB.jar file is the database engine and will automatically be loaded when the ColdFusion server is started.
In this section you will set up the F4CF_FictitiousSalesPlanner database instance in the HSQLDB engine. This database contains the employee sales data for the Fictitious Sales Planner sample application, which is used in other tutorials of the Flex and ColdFusion mini learning center:
Unzip the file to the \wwwroot\WEB-INF directory and review the contents:
The HSQLDB engine should be initialized and the new F4CF_FictitiousSalesPlanner database instance should be created in the memory of your ColdFusion server.
In this section, you will use the ColdFusion Administrator to create the data source for the HSQLDB database instance:
Log on to the ColdFusion Administrator and create a new data source named F4CF_FictitiousSalesPlanner with a Driver type of other (see Figure 1).

Figure 1. Create a new data source using the ColdFusion Administrator.
In the JDBC URL box, enter jdbc:hsqldb:file:yourlocalpath where yourlocalpath refers to the full path to the F4CF_FictitiousPlanner.properties file on your system. Leave the .properties extension off the file name (see Figure 2).
For a standalone installation of ColdFusion for the PC, for example, copy and paste the following value:
jdbc:hsqldb:file:C:\ColdFusion8\wwwroot\WEB-INF\db\F4CF_FictitiousSalesPlanner\F4CF_FictitiousSalesPlanner
For a standalone installation of ColdFusion for the Mac, use the following value:
jdbc:hsqldb:file:/Applications/ColdFusion8/wwwroot/WEB-INF/db/F4CF_FictitiousSalesPlanner/F4CF_FictitiousSalesPlanner
Figure 2 shows the settings for a default standalone installation of ColdFusion on Windows XP.

Figure 2. FictitiousSalesPlanner data source properties for Windows XP.
Figure 3 shows the settings for a default standalone installation of ColdFusion on Mac OS X.

Figure 3. FictitiousSalesPlanner data source properties for Mac OS X.
You should see the data source updated successfully message at the top of the screen and an OK status in the table as shown in Figure 4.

Figure 4. Your ColdFusion data sources are set up.
You will be testing the installation of the F4CF_FictitiousSalesPlanner data source later in this tutorial.
If the ColdFusion Administrator reports an error connecting to the database, you may need to restart the ColdFusion server to refresh the HSQLDB engine and databases in memory before you attempt to set up the data source again.
As you develop your applications, keep in mind that the HSQLDB engine and databases are stored in ColdFusion server memory. If you make changes to the .script or .properties files, you will likely need to restart the server.
Additionally, if you encounter an error (like the one shown in Figure 5 which states that a database table cannot be found), consider that the HSQLDB data source path may not be configured properly. If your data source path points to the wrong location and HSQLDB does not find the expected .properties file, it will create a .properties file with an empty database. The data source will validate, but the tables, columns, and data will not exist.

Figure 5. Some errors may be symptomatic of a bad HSQLDB data source path.
Note: If you are working through the Getting Started section of the Flex and ColdFusion mini learning center, continue with the following section. If you came to this section from another Flex for ColdFusion developers tutorial, return to that tutorial for your next tasks.