Setting Up Your Database and ColdFusion Data Source
June 28, 2006 | 0 comments
Setting Up Your Database and ColdFusion Data Source
So far, so good. You’ve already created the Captivate files and have figured out how to configure the JavaScript code to display the test results. Next, you’ll create your database in Microsoft Access, or use the database included with this tutorial, quizresults.mdb, included in the ZIP file you downloaded from the Requirements section. If you create your own database, use the following database schema.
Columns | Attributes |
---|---|
id | Autonumber |
total | Number |
correct | Number |
accuracy | number |
name | Text |
Text |
Now, to create the ColdFusion data source, use the following steps:
- Log on to ColdFusion Administrator.
- Select Data Sources.
- For this example, type myQuiz for the name of the data source.
- Select the Microsoft Access driver.
- Click Add.
- For the Database File field, click Browse Server to locate your database, quizresults.mdb.
- Enter the database user name or password, if required.
- Click Submit.
- The ColdFusion administrator verifies your database connection. If it fails, check the file location, username, and password.
Next, you use ColdFusion to insert data into the database.
Comments