无法使用光滑的

时间:2016-12-01 15:28:45

标签: sql-server scala slick

我是scala的新手,我正试图尝试连接到本地ms sql express 2016数据库,我尝试过的所有内容都失败了。我使用这篇文章作为起点scala-connecting-to-a-database。 我可以通过SQL Server Management Studio连接到SQL服务器,使用SQL Server Auth没有任何问题。我似乎无法使用光滑连接。 SQL数据库设置为允许远程服务器连接。

以下是我收到的错误,我的build.sbt和application.conf其余文件与上面链接的博客文章中找到的存储库相匹配。

ERROR : java.sql.SQLException: Network error IOException: Connection refused: connect

Build.sbt

name := "SlickTEST"
version := "1.0"
scalaVersion := "2.11.7"
libraryDependencies ++= {
  Seq(
    "net.sourceforge.jtds"      %     "jtds" % "1.3.1",
    "com.typesafe.slick"        %%    "slick"               %   "3.0.0",
    "com.typesafe.slick"        %%    "slick-extensions"    %   "3.0.0",
    "org.scala-lang.modules"    %     "scala-async_2.11"    %   "0.9.6-RC2"
  )
}
resolvers += "typesafe" at "http://repo.typesafe.com/typesafe/releases/"


application.conf

db.default.slickdriver=com.typesafe.slick.driver.ms.SQLServerDriver
db.default.driver=net.sourceforge.jtds.jdbc.Driver    
dms = {
  url = "jdbc:jtds:sqlserver://JAMES/SQLTESTBED;instance=MSSQLSERVER;user=sa;password=test123;"
  driver = net.sourceforge.jtds.jdbc.Driver
  connectionPool = disabled
  keepAliveConnection = true
}

0 个答案:

没有答案