-
-
Notifications
You must be signed in to change notification settings - Fork 17
odbc sqlserver notes
Ryan Culpepper edited this page Mar 24, 2018
·
12 revisions
Using #:strict-parameter-types? #t
seems to work.
Fetching NUMERIC/DECIMAL
fields works using SQL_ARD_TYPE
FIXME: add quirk to send times with fractional times with SQL_C_SS_TIME2
?
- install SQL Server Express 2017
- picked Basic, no customization
Server=localhost\SQLEXPRESS;Database=master;Trusted_Connection=True;
- picked Basic, no customization
- install SSMS 17.5
- turn on protocols
-
Driver = ODBC Driver 13 for SQL Server
orDriver = SQL Server Native Client 11.0
Server = localhost\SQLEXPRESS
Issue: Several concurrent tests fail with Connection is busy with results for another command (HY000)
- need to set
MARS_Connection = Yes
option (can't use gui, must edit registry entry!) - refs: https://stackoverflow.com/questions/9017264/why-only-some-users-get-the-error-connection-is-busy-with-results-for-another, https://github.com/catherinedevlin/ipython-sql/issues/54, https://serverfault.com/questions/302169/odbc-sql-server-how-do-i-turn-on-multiple-active-result-setsmars-for-a-syst
Issue: time
roundtrip causes error: "unsupported type (typeid: -154)"
- extension: https://docs.microsoft.com/en-us/sql/relational-databases/native-client-odbc-date-time/data-type-support-for-odbc-date-and-time-improvements
- added
SQL_SS_TIME2
support
Issue: Multi-statement string doesn't raise error.
- workaround: skip test
Issue: tinyint
roundtrip -1
causes overflow error (SQLSTATE 22003)
- workaround: test as if smallint
Issue: timestamp
test causes error: "Explicit conversion from data type datatime2 to timestamp is not allowed. (SQLSTATE: 22018)"
- workaround: test as if datetime