DataFaucet is designed to be easy to install.
- Create a database and configure it in the ColdFusion administrator. I named my DSN "DataFaucet".
- Download the latest version from RIAForge. Extract the DataFaucet.zip archive to your server. Note the location. You may want to create a /datafaucet mapping either in the ColdFusion administrator or in your Application.cfc to help with the next step, although it's not required.
- Open the faucet in your application:
- Application.cfm - Add this tag
<cfmodule template="/path/to/datafacuet/open.cfm" />(NOTE: DataFaucet only has two custom tags for very specific purposes - the rest of the system is entirely CFC-driven. This tag in particular exists to eliminate dependency on specific ColdFusion server mappings.)
- Application.cfc - Same as above, however the tag should be placed in the onRequestStart method and optionally if you want to use DataFaucet in your onApplicationStart event, at the beginning of that event also. - See the template /samples/Application.cfc to see an example of this.
- datasource - the name of your ColdFusion DSN - this is used as the datasource attribute of CFQUERY tags
- server - the type of database server you're using
NOTE: this is optional if you're using one of the already supported database platforms - some platforms may be cross-compatible, for example, "mssql" may work for a Sybase datasource
- msaccess - Microsoft Access
- mssql - Microsoft SQL Server
- mysql - MySQL
- oracle - Oracle
- schema - for Microsoft SQL Server this is usually "DBO" - this is not required for MS Access or MySQL
- username - optional if entered in the ColdFusion administrator
- password - optional if entered in the ColdFusion administrator
So if you were using a Microsoft SQL Server database named "DataWarehouse", your configuration tag would look like this:
<cfmodule template="/path/to/datafaucet/open.cfm" datasource="DataWarehouse" server="mssql" schema="dbo" [username="myusername"] [password="mypassword"] />
That's it, you should be good to go.