MSSQL Server connections via Windows Authentication #303
Answered
by
vincentlauvlwj
celestialvigor
asked this question in
Q&A
-
Hello everyone, We are considering using Kotlin and Ktorm in my company's development environment, and one of our questions was regarding Ktorm's support for MSSQL Server connections done via Windows Authentication mode (as opposed to SQL Server Authentication mode). It'd be great if anyone could enlighten me in that regard, as I couldn't find a clear direction in the docs. |
Beta Was this translation helpful? Give feedback.
Answered by
vincentlauvlwj
Jun 30, 2021
Replies: 1 comment 1 reply
-
Just connect like this: val database = Database.connect("jdbc:sqlserver://MyServer:integratedSecurity=true;") In production environment, I'll be better to use a connection pool: val datasource = ... // Any java.sql.DataSource implementation is OK.
val database = Database.connect(datasource) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
celestialvigor
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just connect like this:
In production environment, I'll be better to use a connection pool: