[Haskell-cafe] SQL select for HDBC.ODBC MSSQL driver

Anakreontas anakreonmejdi at gmail.com
Tue Oct 27 12:34:53 UTC 2015


I obtain a connection and try to execute a query on MSSQL server with HDBC
  c <- connectODBC "Driver={SQL 
  stm <- quickQuery c "select count(*) as cnt from X__FD" []

HDBC obtains the connection but the SQL query raises an exception with the 
following message:
SqlError {seState = "[\"25000\"]", seNativeError = -1, seErrorMsg = 
"disconnect: [\"0: [Microsoft][ODBC SQL Server Driver]Invalid transaction 

No matter which statement I tried, I always get the "Invalid transaction 
state" message.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20151027/79032664/attachment.html>

More information about the Haskell-Cafe mailing list