Skip to content

odbc sqlserver notes

Ryan Culpepper edited this page Mar 19, 2018 · 12 revisions

ODBC SQL Server notes

Setup

  • install SQL Server Express 2017
    • picked Basic, no customization
      • Server=localhost\SQLEXPRESS;Database=master;Trusted_Connection=True;
  • install SSMS 17.5
  • turn on protocols

ODBC configuration

  • Driver = ODBC Driver 13 for SQL Server or Driver = SQL Server Native Client 11.0
  • Server = localhost\SQLEXPRESS

Issue: Several concurrent tests fail with Connection is busy with results for another command (HY000)

Issues

Remaining issues (Test failures):

  • Multi-statement string doesn't raise error.
  • bigint roundtrip causes overflow error (SQLSTATE 22003)
  • time roundtrip causes error: "unsupported type (typeid: -154)"
    • TODO: allow connection to specify blacklisted types; or fetch as string instead?
  • timestamp test causes error: "Explicit conversion from data type datatime2 to timestamp is not allowed. (SQLSTATE: 22018)"

Notes

No parameter types (unknown)

Fetching NUMERIC/DECIMAL fields works using SQL_ARD_TYPE

Clone this wiki locally