I cant get ColdFusion to connect to an Azure Database. We have an old ColdFusion based admin routine that requires a datasource and we are moving from aws to azure.
After reading online, it seems it wont work unless you use an Other datasource and jdbc driver and settings. However in ColdFusion 11, it just wont validate and tells me
Connection verification failed for data source: MyData
com.microsoft.sqlserver.jdbc.SQLServerException: The connection string contains a badly formed name or value.
The root cause was that: com.microsoft.sqlserver.jdbc.SQLServerException: The connection string contains a badly formed name or value.
Ive tried lots of combinations and cant get it to work. Has anyone got this working and have an example connection string.
ColdFusion comes with OLE DB providers for accessing MS Access and MS SQL Server. Other third-party OLE DB drivers are available from a number of vendors. Native drivers. The Enterprise version of ColdFusion comes with native driver support for DB2 5.0 and 6.1, Informix 7.
Set up the database in the ColdFusion AdministratorOpen the ColdFusion Administrator. Click Data & Services > Data Sources. Type northwind in the Data Source Name field, and select Microsoft SQL Server in the Driver drop-down list. Click Add.
I finally worked it out. The examples I found online were wrong. Below are the settings you need. You will need to download the latest jdbc drivers from Microsoft and put the jar files into the lib
directory of your ColdFusion installation (or in the CF classpath) and restart the CF server first.
Other
com.microsoft.sqlserver.jdbc.SQLServerDriver
Microsoft SQL Server Azure
jdbc:sqlserver://YOURSERVERNAME.database.windows.net:1433;databaseName=YOURDATABASENAME;user=YOURUSERNAME@YOURSERVERNAME;password=YOURPASSWORD;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With