Enable Your Database
- MS SQL Server and MySQL: The MSSQL and MySQL Server folders each contain a file called createtables.cfm
and a folder called createtables. Open the file with an editor. You will edit the top 3 lines in the
directions that follow.
<cfset dsn = "">
<cfset username = "">
<cfset password = "">
- Create a blank database, then skip to the next section, "Create
Your Datasource". After creating the datasource, go to the next step.
- Enter the datasource name as the dsn value above. The username and password
are generally entered when the DSN is created. If not, enter them also.
- Upload the file and the folder to the ColdFusion server. Do not upload Application.cfm
yet, or rename it if you have already uploaded it. It will cause an error until
all the tables have been created in the database.
- Point your browser to this file on the ColdFusion server.
- If the script times out you may need to open the file and remove
the create table queries up to where it did time out. It's not a bad idea to check
where it timed out and if it was inserting states or whatnot, make sure they're all in there.
- You should delete the file and folder from the web server when finished.
- MS Access: (NOTE: Although we've never "recommended" using Access as the database,
we now advise against it. We make too many calls to the database and MySQL hosting is available cheap.)
Simply rename the database (if desired) and upload to a directory
OUTSIDE of your web root that is inaccessible to a web browser. If your FTP
directory structure is such that this is not possible, ask your web host to
create a password protected web directory and place the database there. It is
important that if someone knows or guesses the name of your database, that they
not be able to download it by simply entering the URL to the database.