Karsten,
I posted this reply in your bug report (
http://zeosbugs.firmos.at/view.php?id=224):
Seems like fetchrow is working, at least when it comes to stopping after loading 400 records into the dataset.
The problem may indeed be that all data are downloaded by libmysql before being processed by zeoslib. This is a known issue for mysql servers as the protocol used between client and server forbids sending other statements to the server as long as the data isn't completely fetched. Reading line by line would block all other data retrieval from the server.
Now, you should test the time difference between the end of 'Active=true' and the end of the "Label1.Caption:=format('%d/%d',[ZQuery1.RecNo,ZQuery1.RecordCount]);" line, because that's where the zeoslib fetch happens. I suspect there you will see the effect of FetchRows effectively when changing the property between different runs. If this is the case the functionality of fetchrows is proven to be working correctly I'm afraid.
However, when you know what you're doing, there MAY be a solution for this behaviour by adding 'useresult=true' to the query properties. This is not the default setting, but should instruct libmysql to only fetch the required data. The side effects I can't predict, however. I think one of the conditions for using 'Useresult' is reading to the end of the data in all circumstances.
Seems to me you better use a separate connection for this query object.
Finally, when dealing with this number of records, you must be sure you really need als those rows in your program. Nobody ever scrolls a 400000 line grid manually. So only in batch programs you can need this large datasets. (And even then there's usually a way of pushing the work to the database server) When talking about batch programs it may be more efficient and safer (with regard to useresult) to use the dbc layer directly in your program.
Mark