Re: [Haskell-cafe] HDBC-odbc 1.1.4.4 fixes Windows linking problems
On Wed, 04 Jun 2008, John Goerzen wrote: Prelude Database.HDBC Database.HDBC.ODBC conn - connectODBC dictation Please note that this is not a valid connection string. I need to remember the connection functions are specific to the drivers and there are differences between connectODBC and connectSqlite3. The HDBC-odbc API docs ... give the example string of: DSN=hdbctest1 as well as a link to the Microsoft document that describes the string: http://msdn.microsoft.com/en-us/library/ms715433(VS.85).aspx That URL also contains error message descriptions. For your state 01S00, it lists: Invalid connection string attribute Your fix may be as simple as prepending the string with DSN=. That did the trick. And I can insert and query the database. So HDBC-odbc-1.1.4.4 is good here. -- Dr Bean Make a mistake. Try it, you'll like it. --Dr Bean ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] HDBC-odbc 1.1.4.4 fixes Windows linking problems
On Wed, 04 Jun 2008, Andrew Appleyard wrote: Prelude Database.HDBC Database.HDBC.ODBC handleSqlError $ conn - connectODBC dictation interactive:1:0: Parse error in pattern Try: conn - handleSqlError $ connectODBC dictation C:\cygwin\home\Administratordictation dictation: user error (SQL error: SqlError {seState = [\IM002\,\01S00\], s eNativeError = -1, seErrorMsg = connectODBC/sqlDriverConnect: [\0: [Microsoft] [ODBC \\197X\\176\\202\\181{\\166\\161\\186\\222\\178z\\173\\251] \\167\\228\\16 4\\163\\168\\236\\184\\234\\174\\198\\168\\211\\183\\189\\166W\\186\\217\\165B\\ 165\\188\\171\\252\\169w\\185w\\179]\\170\\186\\197X\\176\\202\\181{\\166\\161\ ,\0: [Microsoft][ODBC \\197X\\176\\202\\181{\\166\\161\\186\\222\\178z\\173\\25 1] \\181L\\174\\196\\170\\186\\179s\\189u\\166r\\166\\234\\196\\221\\169\\202\] }) ghc can't handle Chinese Big5, it appears, but HDBC also does appear to be talking ODBC. -- Dr Bean If there is one thing we know after studying experts, it is that experts know more than we know. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] HDBC-odbc 1.1.4.4 fixes Windows linking problems
On Tue, 03 Jun 2008, John Goerzen wrote: Hi, HDBC-odbc version 1.1.4.4 has been uploaded to Hackage. It fixes the problems some here have encountered regarding ODBC crashes or other similar odd behavior on Windows. I'm getting a 'Parse error in pattern' error. C:\Documents and Settings\Administratorghci GHCi, version 6.8.2: http://www.haskell.org/ghc/ :? for help Loading package base ... linking ... done. Prelude :m Database.HDBC.ODBC Database.HDBC Prelude Database.HDBC Database.HDBC.ODBC conn - connectODBC dictation 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.4 ... linking ... done. *** Exception: (unknown) Prelude Database.HDBC Database.HDBC.ODBC handleSqlError $ conn - connectODBC dictation interactive:1:0: Parse error in pattern -- Dr Bean If there is one thing we learn from the study of language learning, it is that language learners learn more than we learn. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] HDBC with SQL Server / OBDC
On Sun, 25 May 2008, Morten Holm Pedersen wrote: 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. I have been having the same (or similar) problem with HDBC and SQL Server. I have no problem using HDBC and SQLite on Windows, and also have no problems with perl's DBI and DBD::ODBC connecting to the SQL Server database with the same DSN. But I don't know where to point the finger, and I don't know what to do next. It does seem strange that there is no error message when ghci crashes. -- Dr Bean Autonomous language learning: My next project after overseeing the making of laborers into athletes. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe