On Windows, it is possible to store the username and password for a connectionstring as part of the DSN.
However, ODBC.DSN expects the username and password to be passed in along with the DSN.
The end result is that while this works in R:
library(odbc)
con = dbConnect(odbc(), "MyDSN")
This does not work in ODBC.jl:
using ODBC
con = ODBC.DSN("MyDSN")
ODBC.ODBCError("ODBC.API.SQLConnect(dbc, connectionstring, username, password) failed; return code: -1 => SQL_ERROR")
in top-level scope at untitled:4
in ODBC.DSN at ODBC\KFiOK\src\ODBC.jl:122
in DSN at ODBC\KFiOK\src\ODBC.jl:122
in #DSN#3 at ODBC\KFiOK\src\ODBC.jl:57
Ideally, if the user has chosen not to specify a username and password, ODBC.DSN should check whether the username and/or password is available in the DSN.
On Windows, it is possible to store the username and password for a connectionstring as part of the DSN.
However,
ODBC.DSN
expects the username and password to be passed in along with the DSN.The end result is that while this works in R:
This does not work in
ODBC.jl
:Ideally, if the user has chosen not to specify a username and password,
ODBC.DSN
should check whether the username and/or password is available in the DSN.