When I'm using the connection string using the DSN keyword, I've the following error:
error: unable to open tcp connection with host 'localhost:1433': dial tcp [::1]:1433: connect: connection refused
whereas using the fqdn directly server=test.windows.net; , everything works as expected.
It seems go-mssqldb doesn't support the DSN keyword in the connection string for odbc driver connection to a mssql
According to the documentation, DSN corresponds to
Name of an existing ODBC user or system data source. This keyword overrides any values that might be specified in the Server, Network, and Address keywords.
AFAIK the odbc: syntax is purely to denote the encoding/style of string, not to imply that it looks up DSNs in the ODBC catalog.
There's no linkage between go-mssqldb and ODBC.
Hello,
I'm facing an issue while connecting to a mssql server using ODBC and a DSN (Data source Name).
I have the current odbc.ini file:
and I'm using this script (for example purpose, i'm setting a fake mssql server test.windows.net) :
When I'm using the connection string using the DSN keyword, I've the following error:
whereas using the fqdn directly
server=test.windows.net;
, everything works as expected.It seems go-mssqldb doesn't support the DSN keyword in the connection string for odbc driver connection to a mssql According to the documentation, DSN corresponds to
source
Is it planned to be supported?
Thanks by advance, Chris