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
Greg Matheson wrote: 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 Please note that this is not a valid connection string. The HDBC-odbc API docs are available at http://software.complete.org/static/hdbc-odbc/doc//HDBC-odbc/Database-HDBC-ODBC.html and give the example string of: DSN=hdbctest1 as well as a link to the Microsoft document that describes the string, which lives at: 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 An invalid attribute keyword was specified in the connection string (InConnectionString), but the driver was able to connect to the data source anyway. (Function returns SQL_SUCCESS_WITH_INFO.) Your fix may be as simple as prepending the string with DSN=. -- John ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] HDBC-odbc 1.1.4.4 fixes Windows linking problems
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. Thanks to Andrew Appleyard for tracking down the problem and sending me a patch. The detailed explanation, if you're interested, is a ccall vs. stdcall issue in FFI. Details here: http://git.complete.org/hdbc-odbc?a=commit;h=cca312d9891d227094494dcee518f436042e14b4 People that are not using HDBC-odbc on Windows will not find any difference or other changes in this version. -- John Goerzen Author, Foundations of Python Network Programming http://www.amazon.com/exec/obidos/tg/detail/-/1590593715 ___ 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-odbc 1.1.4.4 fixes Windows linking problems
On 4/06/2008 1:05 PM, Greg Matheson wrote: 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 handleSqlError $ conn - connectODBC dictation interactive:1:0: Parse error in pattern Try: conn - handleSqlError $ connectODBC dictation You can only use '-' in a do expression, or at the GHCi prompt. -- Andrew ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe