CF Snippets

Microsoft SQL Server Datasource Configuration

Connect to an MSSQL database from CFML by placing this datasource struct configuration in your Application.cfc.

this.datasources["myApp"] = {
	class: "com.microsoft.sqlserver.jdbc.SQLServerDriver"
, bundleName: "mssqljdbc4"
, bundleVersion: "4.0.2206.100"
, connectionString: "jdbc:sqlserver://localhost:1433;DATABASENAME=app;sendStringParametersAsUnicode=true;SelectMethod=direct"
, username: "admin"
, password: "myPassword"
};