我在编写关于sql数据库时,出现了下面的错误: java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error establishing sock et. at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Sou rce) at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown S ource) at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source) at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at CreatTableTest.getConnection(CreatTableTest.java:108) at CreatTableTest.main(CreatTableTest.java:28) Exception in thread "main" java.lang.NullPointerException at CreatTableTest.createTable(CreatTableTest.java:41) at CreatTableTest.main(CreatTableTest.java:29) 是什么意思》是说我的数据库安装的不正确吗?》
----------------解决方案--------------------------------------------------------
你用的是jdbc-odbc桥连接吧,在操作系统中设置的数据源是不是有问题?
----------------解决方案--------------------------------------------------------
你要使用的jdbc驱动 把那3个炸包考到 jre\lib\ect我记得是这个目录下面
要是jdbc-odbc桥的话不会出这个问题 应该是别的异常
----------------解决方案--------------------------------------------------------
都不说具体点............................
----------------解决方案--------------------------------------------------------