如何通过jdbc连接SQL Server Express版本
大家好,我需要用JDBC连接SQL Server 2012 Express版本。现在我用SQL Server Management Studio连接都没有问题,但是用
String connectionUrl = "jdbc:sqlserver://localhost;databaseName=MyDB;integratedSecurity=true;";
Connection conn = DriverManager.getConnection(connectionUrl);
报出异常
com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 1433 has failed. Error: "Connection refused: connect. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
因为我用的是 SQL Server Express 版本,所以不知道如何配置端口。请教解决过这个问题的高手。
String connectionUrl = "jdbc:sqlserver://localhost;databaseName=MyDB;integratedSecurity=true;";
Connection conn = DriverManager.getConnection(connectionUrl);
报出异常
com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 1433 has failed. Error: "Connection refused: connect. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
因为我用的是 SQL Server Express 版本,所以不知道如何配置端口。请教解决过这个问题的高手。
...全文
相关推荐
配置SQL Server2005 express与jdbc连接
"配置SQL Server2005 express与jdbc连接"在Java开发中,与数据库进行交互是一项重要的任务。本文详细介绍了如何配置SQL Server 2005 Express版本以实现
JDBC连接Microsoft SQL 2005 Server Express Edition数据库的方法
**加载数据库驱动**: 在连接SQL Server 2005之前,需要确保已经安装了对应版本的JDBC驱动,通常是JDBC Driver for Microsoft SQL Server(也称为sqljdbc4
Microsoft SQL Server Express通过JDBC-ODBC桥和jdbc远程连接.pdf
在文件中提到了Microsoft SQL Server Express通过JDBC-ODBC桥和JDBC远程连接的具体操作步骤:1.
应用JDBC连接Microsoft SQL 2005 Server Express Edition数据库的方法
本文主要介绍了如何使用JDBC技术在Java Web开发中连接Microsoft SQL Server 2005 Server Express Edition数据库。首先,需要安装“SQL Serv
Microsoft SQL Server Express通过JDBC-ODBC桥和jdbc远程连接.doc
Microsoft SQL Server Express通过JDBC-ODBC桥和jdbc远程连接.doc


