> If you already have an open result and try to run another query, you
> will get an expcetion with the MySQL drivers.
OK, this was the subject of my other recent message.
> >What I'm seeing is that if I run closeStatement before reading all the
> >rows from a query, it goes ahead and reads the rest of the rows
> >silently, which is bad if there are millions of rows. For instance, if
> >there is an error, like if I request a field with the wrong type, then
> >since these are caught by a 'finally' clause in getFieldValue and
> >trigger a closeStatement, the error message isn't printed (by
> >'handleSql print' in main) until the whole table is read in, several
> >minutes later.
> That doesn't seem like what you'd expect. Bug in the driver, or HSQL maybe?
I don't know, but the HSQL code looks like it's doing the right thing.
OTOH, MySQL should do better than that...
> >I'm trying to get MyODBC installed - this is necessary using MySQL
> >through ODBC, right? - to see if the behavior is any different, since
> >you seemed to imply it would be less problematic.
> Well, yes and no. You don't get the exception like with the MySQL
> driver, but the reason for that is that the MyODBC driver seems to fetch
> the entire result set from the server straight away and keep it locally.
> So you can have two open queries, but the only thing you gain from
> laziness is that the data you never use will be in C code, not Haskell,
> and thus take up less space. But that of course won't help if the
> results are larger that you local RAM for example.
Ah, that's terrible. So I have no reason to use ODBC.