From: Frederik E. <fre...@a5...> - 2005-03-19 23:50:02
|
> You might want to be careful with collectRowsAsync. We have the same > thing in HaskellDB, and it turns out to be a problem with some databases > if you run a second query without getting all that data from the first > one. I think MySQL with the native drivers does it for example, but not > with ODBC. What are the symptoms? 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. 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. Frederik -- http://ofb.net/~frederik/ |