本文介绍了ColdFusion 11和Azure数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法让ColdFusion连接到Azure数据库.我们有一个旧的基于ColdFusion的管理例程,该例程需要一个数据源,并且我们正在从aws迁移到azure.

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.

在线阅读后,除非您使用Other数据源和jdbc驱动程序及设置,否则它似乎无法工作.但是在ColdFusion 11中,它只是无法验证并告诉我

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.

推荐答案

我终于解决了.我在网上找到的示例是错误的.以下是您需要的设置.您将需要从Microsoft下载最新的jdbc驱动程序,并将jar文件放入ColdFusion安装的lib目录中(或在CF类路径中),然后首先重新启动CF服务器.

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 URL: jdbc:sqlserver://YOURSERVERNAME.database.windows.net:1433;databaseName=YOURDATABASENAME;user=YOURUSERNAME@YOURSERVERNAME;password=YOURPASSWORD;
  • DataSource Type: Other
  • Driver Class: com.microsoft.sqlserver.jdbc.SQLServerDriver
  • Driver Name: Microsoft SQL Server Azure
  • JDBC URL: jdbc:sqlserver://YOURSERVERNAME.database.windows.net:1433;databaseName=YOURDATABASENAME;user=YOURUSERNAME@YOURSERVERNAME;password=YOURPASSWORD;

这篇关于ColdFusion 11和Azure数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 18:14