[Haskell-cafe] HDBC-odbc 1.1.4.4 fixes Windows linking problems

John Goerzen jgoerzen at complete.org
Wed Jun 4 12:43:23 EDT 2008


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\Administrator>ghci
> 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



More information about the Haskell-Cafe mailing list