[英]Where exactly should JDBC URL value be changed?
I'm trying to run some application and get the following error: 我正在尝试运行某些应用程序并出现以下错误:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection while in manual transaction mode.
java.sql.SQLException:[Microsoft] [用于JDBC的SQLServer 2000驱动程序]在手动事务模式下无法启动克隆的连接。
I know that I should add the parameter ;SelectMethod=Cursor to your JDBC URL 我知道我应该将参数; SelectMethod = Cursor添加到您的JDBC URL
But I'm having problem understanding where exactly should I change it? 但是我在理解应该在哪里进行更改时遇到问题? Should it be some conf file in JDBC driver folder somewhere?
它应该是JDBC驱动程序文件夹中某个位置的conf文件吗? Or can I do it from sql management studio?
还是可以从sql management studio中做到这一点? Also is there some easy way to determine if and what version of JDBC driver I have?
还有一些简单的方法可以确定我是否拥有JDBC驱动程序以及具有哪个版本的JDBC驱动程序?
Help is very much appreciated! 非常感谢您的帮助!
You specify the URL when creating your JDBC connection, eg: 您在创建JDBC连接时指定URL,例如:
Connection con = DriverManager.getConnection(
"jdbc:sqlserver://[serverName[\instanceName][:portNumber]][;property=value[;property=value]]",
username,
password);
Of course you have to replace the stuff in the brackets with your values. 当然,您必须用值替换括号中的内容。
Quite the same is true for every other tool (eg IntelliJ, Eclipse) I know of that connects to a DB via JDBC. 我所知道的所有其他工具(例如IntelliJ,Eclipse)都通过JDBC连接到DB,这同样如此。 See eg attached screenshot.
参见例如所附的屏幕截图。 Here you also specify the connection parameters via the JDBC URL.
在这里,您还可以通过JDBC URL指定连接参数。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.