Help us understand the problem. What is going on with this article?

Scala 2.12.4 Play Framework 2.6.x Play-Slick で SQLServer へ接続する

More than 1 year has passed since last update.

Scala, PlayFramework, IntelliJ IDEAの初心者. Scala学習前にDB接続環境を事前に確認した.

検証環境

Play-Slick関連説明資料

Using Play Slick

Play Slick currently supports Slick 3.2 with Play 2.6, for Scala 2.12 and Scala 2.11.

JDBC driver dependency
The Play Slick module does not bundle any JDBC driver. Hence, you will need to explicitly add the JDBC driver(s) you want to use in your application.

Third, in the above configuration slick.dbs.default.profile is used to configure the Slick profile, while slick.dbs.default.db.driver is the underlying JDBC driver used by Slick’s backend. In the above configuration >we are configuring Slick to use H2 database, but Slick supports several other databases. Check the Slick documentation for a complete list of supported databases, and to find a matching Slick driver.

Slick 3.2.0 manual UPGRADE GUIDES

Slick Extensions
The Slick Extensions package with additional profiles for Oracle, DB2 and SQL Server does not exist anymore for Slick 3.2. These profiles have been added to the core Slick package:

OracleProfile
DB2Profile
SQLServerProfile

SQLServerProfile

slick.jdbc.SQLServerProfile

DB接続設定

下記の通り, 依存ライブラリ・データベースを定義する.

build.sbt
libraryDependencies += "com.microsoft.sqlserver" % "mssql-jdbc" % "6.2.1.jre8"
conf.application.conf
slick.dbs.default.profile = "slick.jdbc.SQLServerProfile$"
slick.dbs.default.db.driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver"
slick.dbs.default.db.url = "jdbc:sqlserver://host:port;databaseName=db"
slick.dbs.default.db.user = "user"
slick.dbs.default.db.password = "password"

日本語名のデータベース・テーブルへ接続できた! <- これが検証したかった事.

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away