You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I am having an issue where when I am try to connect to the database with the following string
"DRIVER={ODBC Driver 17 for SQL Server};SERVER=example;Uid=domain\\test;Pwd=test" when it tries to login in it uses the user id of domain\\test instead of domain\test is there any way to pass a domain separately?
Here is the code I am using.
{-# LANGUAGE OverloadedStrings #-}
module Lib
( someFunc
) where
import Data.Text (Text, pack, singleton, snoc)
import qualified Data.Text.IO as T
import Database.ODBC.SQLServer
someFunc :: IO ()
someFunc = do
conn <-
connect
("DRIVER={ODBC Driver 17 for SQL Server};SERVER=example;Uid=domain\\test;Pwd=test")
rows <- query conn "SELECT TOP 100 * FROM test with (nolock)" :: IO [[Value]]
print rows
close conn
and here is the error I get "UnsuccessfulReturnCode "odbc_SQLDriverConnect" (-1) "[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Login failed for user ' domain\\test'.[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Login failed for user 'domain\\test'."
The text was updated successfully, but these errors were encountered:
LBjerke
changed the title
Username with a domain failing
Single backslash in uid causing connection failure
Oct 29, 2018
AFAIK, the Microsoft ODBC Drivers for SQL Server do not support Windows authentication on Linux. You can try to use the FreeTDS drivers which do support Windows authentication also on Linux.
Hi I am having an issue where when I am try to connect to the database with the following string
"DRIVER={ODBC Driver 17 for SQL Server};SERVER=example;Uid=domain\\test;Pwd=test" when it tries to login in it uses the user id of domain\\test instead of domain\test is there any way to pass a domain separately?
Here is the code I am using.
and here is the error I get
"UnsuccessfulReturnCode "odbc_SQLDriverConnect" (-1) "[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Login failed for user ' domain\\test'.[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Login failed for user 'domain\\test'."
The text was updated successfully, but these errors were encountered: