Set the MS SQL port in the environment.

As our API to connect to MS SQL does not provide a facility to set the
target port number, place it in the TDSPORT environment variable, which is
reported to have the expected impact.

Should fix #1094.
This commit is contained in:
Dimitri Fontaine 2020-03-27 23:24:16 +01:00
parent 8c59f8c9f9
commit b3cd5f28d6

View File

@ -17,6 +17,9 @@
(setf (slot-value msconn 'type) "mssql"))
(defmethod open-connection ((msconn mssql-connection) &key)
;; we can't pass in the port number, set it in the TDSPORT env instead
(setf (uiop:getenv "TDSPORT") (princ-to-string (db-port msconn)))
(setf (conn-handle msconn) (mssql:connect (db-name msconn)
(db-user msconn)
(db-pass msconn)