Re: [Haskell-cafe] HDBC or HSQL
I think we got this to work. We had to connect to MS SQL Server via odbc. "Geoffrey Zhu" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 07/25/2007 06:11 PM To cc haskell-cafe@haskell.org Subject Re: [Haskell-cafe] HDBC or HSQL Hi, > I use HSQL with PostgreSQL bindings. It works great and I found it very easy > to use. > > -- > Rich I don't mean to hijack the thread. Does anyone have experience in using either HDBC or HSQL with Microsoft SQL server? Thanks, cg ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe --- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] HDBC or HSQL
> From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Donald > Bruce Stewart > > Does anyone know why Takusen isn't on hackage yet? It appears to be > cabalised, and have a tarball: > > http://hackage.haskell.org/packages/archive/pkg-list.html#cat:Database > http://darcs.haskell.org/takusen/ Simply because it's (yet) another thing that neither Oleg nor I have got around to doing, or figuring out how/what to do. (Looking now...) Seems pretty simple. I see there's just one option to cabal's sdist: --snapshot. Can anyone tell me if I should use this or not? Does it matter much? BTW, an ODBC implementation for Takusen is in the pipeline. The latest patches in our darcs repo include some ODBC modules, although they're far from finished. There are still quite a few issues to sort out. After ODBC I think a FreeTDS (http://www.freetds.org/) implementation would be a good idea, as this ought to give native (i.e. not via ODBC) access to both MS Sql Server and Sybase. Alistair * Confidentiality Note: The information contained in this message, and any attachments, may contain confidential and/or privileged material. It is intended solely for the person(s) or entity to which it is addressed. Any review, retransmission, dissemination, or taking of any action in reliance upon this information by persons or entities other than the intended recipient(s) is prohibited. If you received this in error, please contact the sender and delete the material from any computer. * ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] HDBC or HSQL
Ok, I am evaluating HDBC. I wrote a simple test program: ... Can I get a more specific error? Is there a way to inspect this exception more deeply? handleSqlError does the trick, for other newbies: main = handleSqlError $ do dbc <- connectPostgreSQL "dbname=test user=postgres password=,psql51e" putStrLn "done" Everything works ok now, I cann access my psql database and run basic sql queries/updates. -g. -- http://www.me.gr http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] HDBC or HSQL
mutjida: > Hello, > > >Would you go as far to say that when new programmers ask which database > >binding to use, we should _recommend_ HDBC then? (As we do gtk2hs, for > >the gui libraries). > > At this point in time, my advice to new Haskell programmers would be: > first try Takusen, as long as it can connect to the server you're > using (and don't hesitate to ask the maintainers and/or haskell-cafe > questions); then try HDBC, perhaps avoiding the lazy retrieval > function. Thanks Jeff! That's exactly what I was looking for. Does anyone know why Takusen isn't on hackage yet? It appears to be cabalised, and have a tarball: http://hackage.haskell.org/packages/archive/pkg-list.html#cat:Database http://darcs.haskell.org/takusen/ -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] HDBC or HSQL
Hello, Would you go as far to say that when new programmers ask which database binding to use, we should _recommend_ HDBC then? (As we do gtk2hs, for the gui libraries). I'm not sure about this. Although I didn't extensively compare HSQL and HDBC, I got the impression that they offered roughly the same core functionality-- though HDBC seemed to have a few more bells and whistles, and seems to be better maintained. One thing about HDBC is that it provides, and to a certain extent encourages using, a function to lazily retrieve query results. While this can be very convenient, it can also easily lead to very frustrating errors and/or resource leaks (just like any lazy IO operation); I eventually had to remove all trace of this function from my code base. Ideally something like HaskellDB (i.e. a DSL on top of HDBC or HSQL) would be the right thing for new Haskell programmers; however HaskellDB's current documentation really needs to be improved (i.e. easier to find, more comprehensive, full examples... ) before it makes sense to recommend it. Takusen also seems like a good candidate for recommending to new Haskell programmers; the only reason I haven't seriously considered switching to Takusen is the lack of ODBC bindings. I think Takusen's basic design, besides being safe, is quite in line with Haskell and functional programming; Takusen is also actively maintained. On the other hand, Takusen probably has a steeper learning curve than HDBC for a new functional programmer. At this point in time, my advice to new Haskell programmers would be: first try Takusen, as long as it can connect to the server you're using (and don't hesitate to ask the maintainers and/or haskell-cafe questions); then try HDBC, perhaps avoiding the lazy retrieval function. -Jeff ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] HDBC or HSQL
mutjida: > Hello, > > >I don't mean to hijack the thread. Does anyone have experience in > >using either HDBC or HSQL with Microsoft SQL server? > > > I use HDBC with MS SQL Server, Sybase, and Oracle. I use the ODBC > bindings. I am running on both a windows XP machine and a linux > machine (although I haven't been able to get Oracle connectivity on > the linux machine). > > When I started this project, I tried both HSQL and HDBC. I managed to > connect to MS SQL Server, via ODBC, with both systems without > problems. I ultimately chose to go with HDBC because I like the > interface better (but this was a purely subjective decision). Would you go as far to say that when new programmers ask which database binding to use, we should _recommend_ HDBC then? (As we do gtk2hs, for the gui libraries). -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] HDBC or HSQL
Hello, I don't mean to hijack the thread. Does anyone have experience in using either HDBC or HSQL with Microsoft SQL server? I use HDBC with MS SQL Server, Sybase, and Oracle. I use the ODBC bindings. I am running on both a windows XP machine and a linux machine (although I haven't been able to get Oracle connectivity on the linux machine). When I started this project, I tried both HSQL and HDBC. I managed to connect to MS SQL Server, via ODBC, with both systems without problems. I ultimately chose to go with HDBC because I like the interface better (but this was a purely subjective decision). -Jeff ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] HDBC or HSQL
Hi, I use HSQL with PostgreSQL bindings. It works great and I found it very easy to use. -- Rich I don't mean to hijack the thread. Does anyone have experience in using either HDBC or HSQL with Microsoft SQL server? Thanks, cg ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] HDBC or HSQL
On 7/25/07, George Moschovitis <[EMAIL PROTECTED]> wrote: I am a Haskell newbie and I would like to hear your suggestions regarding a Database conectivity library: HSQL or HDBC ? which one is better / more actively supported? I use HSQL with PostgreSQL bindings. It works great and I found it very easy to use. -- Rich JID: [EMAIL PROTECTED] AIM: rnezzy ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] HDBC or HSQL
On 7/25/07, George Moschovitis <[EMAIL PROTECTED]> wrote: I am a Haskell newbie and I would like to hear your suggestions regarding a Database conectivity library: HSQL or HDBC ? which one is better / more actively supported? HDBC Supports Mysql only through ODBC :( ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] HDBC or HSQL
On Wed, 2007-07-25 at 21:04 +0300, George Moschovitis wrote: > Dear devs, > > I am a Haskell newbie and I would like to hear your suggestions > regarding a Database conectivity library: > > HSQL or HDBC ? > > which one is better / more actively supported? My impression (as a packager not a user) is that HDBC is more actively supported. Also, as I understand it, HDBC was designed with the aim of having a better API than that of HSQL. Duncan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe