‘壹’ myeclipse连接sql server 2000出错
驱动?sp4补丁?
‘贰’ sql2000上,无法使用"点"或是"localhost"链接
localhost 使用的数据库是默认的数据库实例“计算机名”,你用它连接自己建的数据库实例“计算机名/实例名”,当然连不上了。
# SQLServer2000
hibernate.dialect org.hibernate.dialect.SQLServerDialect
hibernate.connection.driver_class net.sourceforge.jtds.jdbc.Driver
hibernate.connection.url jdbc:jtds:sqlserver://localhost:1433/cute
hibernate.connection.username sa
hibernate.connection.password root
上面是在eclipse中的配置
jdbc:jtds:sqlserver://MyServerName\MyInstanceName:1433/数据库名
如果用localhost,则是你连接的数据库服务器是“计算机名”,也就是安装时默认创建的实例。用这句
jdbc:jtds:sqlserver://localhost:1433/数据库名