Error while preforming database login with the "sqlserver" driver Unable to create...

        今天在用MyElipse连sqlserver2008r2,新建一个Database Connection Driver,输入各种配置,点击Test Driver,出现了这个错误:“Error while preforming database login with the ’sqlserver‘ driver Unable to create connection.Check your URL“。于是检查url,怎么看都没有拼写错误啊。百度半天也没看出个所以然来。突然想起看了看项目配置文件里的url是怎么写的,这才发现问题。

        我竟忘了sqlserver2008的连接字符串的写法和以前是不一样的。于是把url改成 jdbc:sqlserver://localhost:1433 这才成功。我在Driver template里面选了Microsoft SQL Server,它自动生成的url是这样的jdbc:microsoft:sqlserver://<server_name>:<1433>,我没注意直接填入localhost,于是连接不上。问题是它template里面没有一个选项是Microsoft SQL Server 2008啊。我用的是MyEclipse 8.5。这个地方不注意很容易出错,浪费时间。

你可能感兴趣的:(Error while preforming database login with the "sqlserver" driver Unable to create...)