Page 1 of 1

TZQuery MAX Fields

Posted: 20.10.2009, 16:57
by pabloarthur
Hello:

My question is simple. I am using Delphi 6, latest Service Packs.
MySQL Version 5.0.
and Zeos 6.6.5

I have no problem running TZQuery for queries with less than 256 fields. But when I get to a TZQuery that is more than 256 fields I get an ERangeError with Message 'Range Check Error' I have traced the problem to this line of code in the ZPlainMySQLDriver.pas:

Result := ZPlainMySql41.PMYSQL_ROW(ROW)[Offset]; into this context of code:

function TZMySQL41PlainDriver.GetFieldData(Row: PZMySQLRow;
Offset: Cardinal): PChar;
begin
Result := ZPlainMySql41.PMYSQL_ROW(ROW)[Offset];
end;

I am probably missing a constant to set up the MAX number of fields returned by the TZQuery. Does anyone knows where i can set this constant or anyone have an idea what could be happening?

Thanks in Advance,

Pablo

Posted: 20.10.2009, 18:07
by WorldWalker
Hello,
It could be linked to a DBGrid too, did you check that?

Posted: 24.10.2009, 14:27
by mdaems
Well, I think 256 fields really may be the practical limit. We have tried to expand that number once, but then all apps using zeoslib start eating huge amounts of memory.
If I remember correctly the change to allow more fields was small. If I could only remember where the topic was discussed.
There's http://zeos.firmos.at/viewtopic.php?t=1367 but there also was a follow-up thread where this solution was reverted.

Mark