[Haskell-cafe] HDBC with SQL Server / OBDC

Morten Holm Pedersen morten.pedersen at virgin.net
Sun May 25 12:24:20 EDT 2008


am trying to do a simple DB connection from Haskell to a SQL Server 2005 
(on Windows obviously). The DSN name ("Nylon") works from C++ but when 
running the below example (or any other I can think of) ghci crashes.
Does anyone know a resolution for this or where the problem can possible 
be ?


GHCi, version 6.8.2: http://www.haskell.org/ghc/  :? for help
Loading package base ... linking ... done.
Prelude> :m Database.HDBC
Prelude Database.HDBC> :m + Database.HDBC.ODBC
Prelude Database.HDBC Database.HDBC.ODBC>  do { conn <- connectODBC 
"DSN=Nylon"; xs <- getTables conn; putStr $ head xs; }
Loading package array-0.1.0.0 ... linking ... done.
Loading package containers-0.1.0.1 ... linking ... done.
Loading package bytestring-0.9.0.1 ... linking ... done.
Loading package old-locale-1.0.0.0 ... linking ... done.
Loading package old-time-1.0.0.0 ... linking ... done.
Loading package mtl-1.1.0.0 ... linking ... done.
Loading package HDBC-1.1.4 ... linking ... done.
Loading package HDBC-odbc-1.1.4.3 ... linking ... done.
CRASH !!!




Thanks
Morten




More information about the Haskell-Cafe mailing list